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

Posted February 12, 2017 2k views
Linux BasicsSecurityDebian

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?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

1) Logging in as root is bad.
2) If you insist on logging in as root, use an SSH key instead:

by Justin Ellingwood
by Brian Boucheron
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.