SECURECRT can not connect to the server, restart the SSH service, sshd Restart service, still not. <strong>[root@localhost ~]# ssh root@127.0.0.1</strong>
Ssh_exchange_identification:connection Closed by remote host
So Google, in part, said it was due to/etc/hosts.allow and/etc/hosts.deny two files.
So check it out, it's really/etc/hosts.allow this file has a problem. [Root@localhost ~]# Cat/etc/hosts.allow
#
# Hosts.allow This file describes the names of the hosts which are
# allowed to with the local INET services, as decided
# by the '/USR/SBIN/TCPD ' server.
#
vsftpd:192.168.1.103 210.31.8. : Allow
ALL:ALL:DENY
Do not know when the unconsciously added these two lines. Killed a man. All comments are dropped and then the SSH service is restarted.
Service sshd Restart or/etc/init.d/sshd restart
It's done.
The way to solve the problem:
1, first look at the SSH service is started. (Service sshd status)
2, check whether the Iptables firewall interception. (iptables-l)
3, check the/etc/hosts.allow,/etc/hosts.deny configuration file.