The Linux system is running normally but cannot use Xshell to connect via ssh

Description of the problem:
The Linux system is running normally but cannot use Xshell to connect through ssh

Solution steps:
There is no time to take screenshots in the future, so I can only describe the process in words

1- ping command to confirm that the server is up and running

2- telnet port 22 found unreachable

3- After remote to the linux desktop, check that the firewall is closed
systemctl status ufw

4- Check the status of the sshd service and find that it is not enabled. Restart and report an error
systemctl status ufw

5- Check that the ssh port in the sshd_config file is still 22 and has not changed
cat /etc/ssh/sshd_config

6- Run sshd -T to prompt the following information (a total of three paragraphs, only one of which is intercepted):
Permissions 0555 for '/etc/ssh/ssh_host_ed25519_key' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
sshd: no hostkeys available – exiting.per

This prompt means that the permissions of three files such as ssh_host_ed25519_key under /etc/ssh/ are too large

7- Change the permission of the three files prompted to 400 (readable by the user)
chmod 400 /etc/ssh/filename

8- After changing the permissions, restart the ssh service and the service will start normally

9- External use Xshell test, can connect normally

Guess you like

Origin blog.csdn.net/qq_33999977/article/details/125769164
Recommended