Xshell 连接本地的Linux 系统,提示:Could not connect to '192.168.182.128' (port 23): Connection failed

—————————
Xshell 连接本地的Linux 系统,提示:Could not connect to ‘192.168.182.128’ (port 23): Connection failed
解决方法:
1.先检查是否是使用的ssh 连接:
2.输入 ping Linux 的ip 如果是可以ping 通的,说明是网络没有问题,再次进行连接,如果依然是连接失败
3. 先查看防火墙的状态,在vmware Linux 系统终端 中输入 service iptables status //centos6中
service firewalld status //centos7中
如果开启,那么关闭防火墙
输入service iptables stop //centos6中
输入service firewalld stop //centos7中
注意:这个防火墙是重启后就复原的,如果想永久生效,输入 开启:chkconfig iptables/firewalld on 关闭:chkconfig iptables/firewalld off .设置后重启 : reboot
4..完成后再次连接,如果依然报错,可能是22 端口没有开
输入 ss -lnt (小写的L)如果发现没有开启 22 端口
开启 ssh 服务,输入 service sshd start ,再次运行 ss -lnt,查看是否已经打开
SSH服务开机自动启动:chkconfigsshd on
取消开机自启动:chkconfig sshd off
开启服务后,检查服务状态:service sshd status
——————————

猜你喜欢

转载自blog.csdn.net/key_book/article/details/80203553