Linux Learning Note-ssh remote connection troubleshooting

Source: Internet
Author: User

Troubleshooting Linux remote Connections

In the actual environment, is generally through SSH remote connection server, when unable to connect remotely, you can follow the following steps to locate the cause of the problem.

1th Step: Check whether the physical link is unblocked

Using the shortcut key Win+r, bring up the DOS window and enter ping ip-t at the command line. (If there is no response, it indicates physical link problem, need to check network card, IP, network cable, firewall, etc.)

C:\users\administrator>ping192.168.1.11-t #<== uses the ping command to check that the-T indicates that Ping is Ping192.168.1.11 with 32 bytes of data: Reply from 192.168.1.11: Byte =32 time <1ms ttl=64 #<== reply indicates unimpeded reply from 192.168.1.11: bytes =32 time <1ms ttl=64

2nd step: Check that the SSH service is intact

telnet IP Port ( Nmap ip-p can achieve the same effect, but only in Linux in use)

c:\users\administrator>telnet192.168.1.11 #<=22 is the default port for sshd service, a new window will pop up successfully.

if it does not, you need to check if there is a problem in the following places :

1) is there a firewall blocking?

[[Email protected] ~]# service iptables stop #<== shut down firewall services [[email protected] ~]# chkconfig iptables off #<== set firewall IPT Ables service boot does not start

2) is the port open?

[Email protected] ~]# Netstat-lntup | grep #<== Check if there is an sshd service port [[email protected] ~]# Netstat-lntup | grep sshd

3rd Step: Check if IP restrictions are being made

The default profile for the SSHD service is:/etc/ssh/sshd_config, to see if it has the following configuration:

allowusers [Email protected]* #<== This configuration allows the root user to access only from the 192.168.1 segment address.

4th Step: Restart the sshd service

[Email protected] ~]#/etc/init.d/sshd restartstopping sshd: [OK]starting SSHD: [OK]

Linux Learning Note-ssh remote connection troubleshooting

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.