xshell不能连接VM中的ubuntu

来源:互联网 发布:中文logo设计软件 编辑:程序博客网 时间:2024/06/03 04:07

前些天在VMware中安装了ubuntu系统,今天想通过xshell连接ubuntu,结果显示

Connecting to 10.61.198.215:22...

Could not connect to '10.61.198.215' (port22): Connection failed.

VM中网络连接设置了Bridge模式。

网络查找解决办法如下:

xshell连接不了ubuntu,原因没有安装openssh-server,解决方法:

$:sudo apt-get install openssh-server

查看server是否启动:

$:ps -ef |grep ssh

如果看到/usr/sbin/sshd -D,说明服务已经启动,否则服务尚未启动,那么需要启动server:

$:/etc/init.d/sshstart

接下来就可以用xshell连接了。

0 0