用xshell5连接虚拟机,显示Could not connect to '192.168.3.128' (port 22): Connection failed.

时间:2017-11-06 18:25:26   收藏:0   阅读:1324

原因:虚拟机上没有安装或者没有启动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

 

原文:http://www.cnblogs.com/sunnyCx/p/7794485.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!