sunnyCx

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

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

 

分类:

技术点:

相关文章:

  • 2021-06-17
  • 2021-03-31
  • 2021-09-24
  • 2021-12-13
  • 2021-08-16
  • 2021-11-14
  • 2021-09-14
  • 2021-05-25
猜你喜欢
  • 2021-07-31
  • 2021-08-01
  • 2021-11-04
  • 2021-10-15
  • 2021-09-30
  • 2021-07-26
  • 2021-05-04
相关资源
相似解决方案