Home  >  Article  >  Operation and Maintenance  >  Solution to failure to start ssh under linux

Solution to failure to start ssh under linux

王林
王林Original
2019-12-02 16:04:2711533browse

The solution to the failure to start ssh under Linux is: 1. Use the "ping" and "telnet" commands to check whether it is a client problem. If not, it means the server problem; 2. Log in through a physical terminal Server; 3. Add the client "IP" to the server's whitelist; 3. Restart "ssh".

Solution to failure to start ssh under linux

#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.

1. SSH login failure error message description

An error occurs when the client connects to the server through the ssh protocol, as shown in the figure:

Solution to failure to start ssh under linux

2. Error troubleshooting

First check whether it is a client problem, and use the ping command and telnet to check.

The ping result is shown in the figure below:

Solution to failure to start ssh under linux

The telnet result is shown in the figure below:

Solution to failure to start ssh under linux

ping and telnet both work, indicating that the problem is not with the client but with the server. You need to log in to the server to troubleshoot.

Although you cannot ssh to the server, generally the host will provide some methods for you to connect, such as connecting through a physical terminal.

After logging in to the server, check the /etc/hosts.allow file to see if the client IP is in the whitelist. After checking, it is found that the client IP is not in the server's whitelist. Passvi /etc/hosts.allow, add the client IP to the whitelist as shown below:

Solution to failure to start ssh under linux

Then restart ssh and restart the command

service  sshd restart

The client re-sshed, the login was successful, and the problem was solved.

More related articles and tutorials are recommended: linux tutorial

The above is the detailed content of Solution to failure to start ssh under linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn