Linux system SSH access denied network failure resolution

Source: Internet
Author: User
Keywords Network failure

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

In the recent encounter with the Web site hanging black chain event was punished by Baidu, the flow of significant reduction, the author began to truly realize that the site security problem is the most important, once the black chain of the early days of hard work will be in a flash in vain. Like most stationmaster, in the website construction, the author chooses Windows 2003 as the server operating system, the biggest consideration is because this operating system is simple and easy to use. Recently in an IT technology friend suggested that I try to "move" the site to the Linux operating system, the Linux operating system itself has a high security, can better protect the site will not lie in the gun. As a beginner of Linux, in the debugging process, because of the Linux operating system is not well-known, encountered SSH access denied network anomalies, in the experience of Internet search solutions, consult friends and other methods, finally resolved, today, the author of the Linux system encountered in the network fault resolution text summarized , hoping to be helpful to webmasters who want to touch Linux server operating system.

On the Linux system server set up Iptables to allow SSH access, set the steps are not complicated, but do not know which aspect of the problem, resulting in the SSH access denied failure, in this case, can only use the elimination method to reduce the possible causes of the problem, To find the crux of the problem and solve it.

(1) Execute command to close iptables. Command: [root@localhost ~]#/etc/init.d/ipables Stop, the result of the command execution may look like the following figure:

  

(2) Test login SSH service is normal, if you can access the system through the SSH tunnel, it may be due to the filyer of the chain conflict or rule set problems caused; If you cannot log in to SSH service, proceed to the next step.

(3) Check the Hosts.deny file for All:all, if/etc/ The Hosts.deny file has the appropriate entry, but there is a typographical error in the Allow item, or will the All:all item in the Deny file be overwritten, the solution being to comment out the All:all item and try again. If you do not have a all:all issue with the Host.deny file, proceed to the next step to find out why.

(4) Check the sshd status. To this point the text does not appear on the system firewall, then we want to see if it is set up even if the reboot will not change the configuration of the sshd, using the command: [root@localhost ~]#/etc/init.d/sshd status, The results of the inspection may look like the following figure:

  

(5) Modify the sshd configuration and reboot the SSH daemon, and then send the NETSTAT–ANT|GREP:22 command to ensure that sshd is bound to the correct port and IP address, the default/ec/sshd/sshd_ Config file to configure the following location modifications:

#Port 22

#Protocol 2,1

#ListenAddress 0.0.0.0

#ListenAddress:

Through the above steps, I believe that can solve the Linux system SSH Access denied problem. The above is based on the author through the repeated search to resolve the SSH access is denied the detailed steps of the method, this article by Taobao rebate http://www.0576mm.com/original summary. If you do not agree, you can message exchange, original starting in A5, reproduced in the time please keep the author link, thank you!

Related Article

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.