After resetting root password, how can i switch back to SSH with no password?

February 12, 2017 309 views
Security Linux Basics Debian

I had an ssh connection working with no password, so i reset my root password in DO panel, now when i use ssh, the server ask for root password ( of course ). The question is: How can i switch back from ssh with no password ask after reset the root password?

1 Answer

1) Logging in as root is bad.
2) If you insist on logging in as root, use an SSH key instead:
https://www.digitalocean.com/community/tutorials/how-to-configure-ssh-key-based-authentication-on-a-linux-server

SSH, or secure shell, is the most common way of administering remote Linux servers. Although the daemon allows password-based authentication, exposing a password-protected account to the network can open up your server to brute-force attacks. In this guide, we demonstrate how to configure your server with SSH keys, which is the recommended authentication method. These are much more difficult for attackers to work around, giving you a more secure login mechanism.
Have another answer? Share your knowledge.