ssh connection failed, Xshell closed Socket unexpectedly error Event: 32 Error: 10053.

created at 06-06-2022 views: 37

problem

This problem may occur when Xshell is closed unexpectedly. It can be solved if the following error occurs:

Connecting to 47.106.80.28:22…
Connection established.
To escape to the local shell, press 'Ctrl+Alt+]'.

Socket error Event: 32 Error: 10053.
Connection closing...Socket close.

Connection closed by foreign host.
Disconnected from remote host(47.106.80.28) at 21:34:21.
Type `help' to learn how to use Xshell prompt.

reason

Due to the accidental shutdown, the permissions of the secret key in linux will be changed accordingly. The reason is unknown for the time being. The solution is as follows: You can enter the system through the web console, and the server provider will provide the corresponding web console, you can log in to the system, and the web login will not be affected. Execute the following code:

solution

# Go to the ssh key directory
cd /etc/ssh
# change key permissions
chmod 400 ./*
# restart sshd
sudo systemctl restart sshd

xshell connects again, successful

created at:06-06-2022
edited at: 06-06-2022: