原因:虚拟机上没有安装或者没有启动ssh

解决:

1.安装sshserver

sudo apt-get install openssh-server

2.启动ssh服务

sudo service ssh status

补充:

(1)启动,停止和重启openssh-server的命令如下:

/etc/init.d/ssh start
/etc/init.d/ssh stop
/etc/init.d/ssh restart

(2)设置开机自启动

打开/etc/rc.local文件,在exit 0前面加上:

/etc/init.d/ssh start

用xshell5连接虚拟机,显示Could not connect to '192.168.3.128' (port 22): Connection failed.的更多相关文章

  1. Xshell5连接虚拟机出现连Could not connect to '192.168.47.128' (port 22): Connection failed,解决办法

    该日记写于2016年11月28日.在用Xshell5连接ubuntu虚拟OS时一直连接不上.出现这种情况的原因可能很多,有像百度上面说的没有关闭linux的防火墙,没有启动linux的ssh服务.但这 ...

  2. xshell连接时报错:Could not connect to '192.168.2.125' (port 22): Connection failed.

    解决思路: 1.首先用主机ping下虚拟机IP,看是否能ping通 2.如果ping不通就看虚拟机防火墙是否开启,service iptables status [root@mysql ~]# ser ...

  3. Xshell 链接 Could not connect to '192.168.80.129' (port 22): Connection failed

    在使用Xshell链接虚拟机VM里面的Linux的时候.链接失败,报 Could not connect to ): Connection failed 解决步骤: 1.重启VM.Linux.Xshe ...

  4. ftp连接服务器失败||或者Xshell链接错误:Could notconnect to '192.168.18.128' (port 22): Connection failed

    有时候刚装完虚拟机发现xshell连接失败,或者使用ftp连接失败.(博主用的是unbuntu,其他linux系统可能在命令上稍有差别,但方法是一样的. xshell连接失败: ftp连接失败: 首先 ...

  5. Could not connect to '192.168.80.145' (port 22): Connection failed的解决办法(远程连不上xshell)

    问题状况表现1 这个问题一般是你 的什么配置影响了虚拟机的网卡网关设置!!!. 问题状况表现2 这个问题一般是你 的什么配置影响了虚拟机的网卡网关设置. 解决办法 网上的那些解决方案,我都试过,比如. ...

  6. Could not connect to '192.168.89.144' (port 22)

    xshell连接linux主机时,会出现错误:Could not connect to '192.168.89.144' (port 22): Connection failed. 但是这时能ping ...

  7. 用xshell连接linux服务器失败 Could not connect to '112.74.73.194' (port 22): Connection failed.

    用XSHELL连接linux服务器出现以下错误 Connecting to 42.51.xxx.xxx:22... Connection established. To escape to local ...

  8. Could not connect to 'xxx.xx.xx.xxx' (port 22): Connection failed.

    刚刚使用xshell好好的,突然注销账号,准备重新连接突然连不上了. 这就很尴尬了,对我这种linux菜鸟只能去百度了,终于解决了,赶紧记录下这个坑 1.先登陆虚拟机,输入这段命令 查看ssh服务是否 ...

  9. ssh: connect to host 192.168.11.180 port 22: Connection refused

    错误原因: 1.sshd 未安装:sudo apt-get install openssh-server 2.sshd 未启动:sudo net start sshd 3.防火墙:sudo ufw d ...

随机推荐

  1. Java中的锁机制,你真的了解吗?

    学到锁说明你已经学过多线程了,只有在多线程并发的情况下才会涉及到锁,相信大家用的最多的要数synchronized了,因为这个也是最简单的,直接加在方法上就可以使一个方法同步.那么除了synchron ...

  2. HTML基础2——综合案例2——复杂的嵌套列表

    <html> <head> <title></title> </head> <body> <ul type="d ...

  3. 全面学习ORACLE Scheduler特性(6)设置Repeat Interval参数

    3.3 设置Repeat Interval Job 和Schedule中REPEAT_INTERVAL参数都是用来控制执行的频率或周期,虽然说周期是一个时间性概念,不过REPEAT_INTERVAL指 ...

  4. 利用反射重写toString()方法

    为了方便输出对象,Object类提供了toString()方法.但是该方法的默认值是由类名和哈希码组成的,实用性并不强.通常需要重写该方法以提供更多的信息.本实例使用反射输出类的包.类的名字.类的公共 ...

  5. Selenium基于Python web自动化基础一 -- 基础汇总及简单操作

    Selenium是UI层WEB端的自动化测试框架,也是目前市面上比较流行的自动化测试框架. ui层自动化测试本质是什么?模拟用户的真实操作行为. 基础汇总: 导入所需要的模块 from seleniu ...

  6. Android基础TOP5_2:MultiAutoCompleteTextView多文本自动补全文本框

    Activity: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmln ...

  7. 解决 HTTP Status 500 - Unable to show problem report: freemarker.core.InvalidReferenceException:

    HTTP Status 500 - Unable to show problem report: freemarker.core.InvalidReferenceException: The foll ...

  8. CherryPy 入门

    CherryPy是一个Python的HTTP框架,可以用Python来处理HTTP请求然后返回结果. 1. 安装 可以去这个地址下载 CherryPy-3.1.2.win32.exe .或者去这个链接 ...

  9. DeepCloneObjects 和 DeepClone

    ARX AcDbDatabase 中的方法 deepCloneObjects() 和 wblock() 区别以及和 AcDbObject 方法 clone() 和 deepClone() 的关系 Ac ...

  10. CAD使用GetxDataDouble读数据(网页版)

    主要用到函数说明: MxDrawEntity::GetxDataDouble2 读取一个Double扩展数据,详细说明如下: 参数 说明 [in] LONG lItem 该值所在位置 [out, re ...