SecureCRT SSH Connection closed

Source: Internet
Author: User
Tags iptables

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.