XShell 连接 VM中Ubuntu问题

来源:互联网 发布:unity3d htc vive开发 编辑:程序博客网 时间:2024/06/07 07:30

首先,主机 与 VMWare中的ubuntu能互相ping通,但是使用Xshell 连接时出现下面错误

Connecting to 192.168.153.128:22…
Could not connect to ‘192.168.153.128’ (port 22): Connection failed.
Type `help’ to learn how to use Xshell prompt.

出现该问题可能为:
1.没有安装ssh;
2.服务器端防火墙关闭了22端口,没有开启ssh服务;

解决问题:
1.安装ssh: ubuntu 中使用命令:sudo apt-get install openssh-server
2.安装完成后,启动ssh:service sshd start

ssh相关命令:
开启ssh服务:service sshd start
关闭ssh服务:service sshd stop
重启ssh服务:servcie sshd restart
SSH服务开机自动启动:chkconfig sshd on
取消开机自启动:chkconfig sshd off
开启服务后,检查服务状态:service sshd status

参考文献:
http://eminzhang.blog.51cto.com/5292425/1323655

原创粉丝点击