无法登录远程主机,VC上控制台也不能登录,只能重启,然后进入控制台查看
## -v表示查看连接详细信息
[root@foundation66 ~]# ssh -v root@172.25.254.166
[root@ansible ~]# ssh -v root@10.129.1.11
OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 59: Applying options for *
debug1: Connecting to 10.129.1.11 [10.129.1.11] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
。。。。。。。。。。
ssh_exchange_identification: Connection closed by remote host
在服务端更改配置文件
[root@localhost Desktop]# vi /etc/hosts.allow
#########################
sshd: ALL ##允许所有ip主机均能连接本机
[root@localhost Desktop]# systemctl restart sshd