Successful resolution of "Connection failed" errors

Table of contents

1. A "Connection failed" error occurs, as shown in the figure below:

2. If the password entered is correct, it will always be output again


1. A "Connection failed" error occurs, as shown in the figure below:

  • Most of the reasons are that the network is unreachable or the port is wrong:
  • Ping the IP (note that some IPs are forbidden to ping) or whether the port is connected

 

 

  •  Check the port of the system: systemctl status sshd (default: 22)

  • Check if sshd is enabled

  •  You can also modify the configuration file: vi /etc/ssh/sshd_config

  • Remember to restart the service after modification

  • If sshd is not enabled, it can be enabled by systemctl start sshd

 2. If the password entered is correct, it will always be output again

  •  Check the configuration file: vi /etc/ssh/sshd_config

  •  The above shows that the root user is disabled, you need to open the root user or create another user

 

 

Guess you like

Origin blog.csdn.net/weixin_43313333/article/details/128598619