代码改变世界

使用xshell连接本地虚拟机中的Linux问题

2017-02-07 17:53  DataBases  阅读(723)  评论(0编辑  收藏  举报

xshell 连接虚拟机中Linux报错:

Could not connect to '192.168.8.120' (port 22):Connection failed.

原因:虚拟机中Linux没有开启sshd服务

解决方法:

root登录虚拟机Linux

service  sshd start

关闭防火墙

service iptables stop

chkconfig iptables off

重新通过xshell连接虚拟机中的Linux即可。