Linux CentOS Xshell无法链接本地虚拟机 运维技术

admin 2018-01-04 4210

本地cmd能够ping同虚拟机的IP地址,但是xshell链接时提示如下:

提示如下:

Connecting to 192.168.1.222:22...

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

Type `help' to learn how to use Xshell prompt.

 

解决办法1:

步骤1:清楚防火墙规则:service iptables stop  
步骤2:关闭防火墙:chkconfig iptables off

步骤3:启动ssh服务:service sshd start

步骤4:开机自动启动ssh服务:chkconfig sshd on

 

取消开机自动启动ssh服务:chkconfig sshd off

 

 

开启服务后,检查服务状态:service sshd status

 

解决原因2:安装ssh:

yum install openssh-server

最新回复 (0)
全部楼主
    • MSDN,我告诉你(中文站)
      2
        登录 注册 获取赞助码
返回