Sometimes, When we tried to make a connection with SSH, we can see below error.
Server unexpectedly closed network connection
Perform the following steps to resolve this error:
We login to our ESXi host as local shell.
# chmod 600 /etc/ssh/ssh_host_rsa_key
Need to restart ssh service after run the above command.
We run the following command to restart the process.
# ./sbin/services.sh restart
Then seamlessly we can connect SSH.