After making some updates on the server, when trying to access by SSH through the WinSCP, we see an unsuccessful authentication message; that prevents us from accessing the console normally. After having checked different parameters through the console and verify that port 22 is listening, we went to verify the SSH configuration file and check its parameters to be able to solve it.
The error message is as follows:
"Authentication log (use session log for more details):
Using the username" root ".
Failed authentication! "
In this case we have solved the problem by changing a parameter of the configuration file. SSH is listening, but since the sshd_config file is not configured correctly, it does not allow you to connect via SSH. Try accessing the configuration file / etc / ssh / sshd_config , and check having the parameter as " PasswordAuthentication yes ".
To do this, follow these steps:
1. Access the console of your provider panel, and type the following command line:
# nano / etc / ssh / sshd_config
3. Search the line " PasswordAuthentication no " and change it to " PasswordAuthentication yes ". If the line with " #" was commented , you must uncomment it.
4.- If you are editing with nano, save the changes with the "CTRL + O" key and press "ENTER", to exit nano press "CTRL + X" and press "ENTER". Once you have left the editor, you must restart the server by typing in console "reboot" + "ENTER"
#reboot
5.- When restarting the server try to access again by SSH, in this case the incident could be resolved and allowed us to access without problems.