I created a droplet with SSH keys authentication. However, I want to change this to accept password authentication. I have changed the sshd_config to allow this but the ssh service still only seems to accept keys.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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.
Heya,
There are typically a few things you need to check, first is if you made the change properly in your
/etc/ssh/sshd_config
. Make sure that there isn’t a typo on the line -Make sure to restart the sshd service afterward as well
service sshd restart
If you are still experiencing the same outcome, check your ssh folder and configs if there aren’t any other options that could be preventing you from continuing.
Heya, @77a8c39df5da495389dbc5a28f3436
On some systems, SELinux or other security frameworks may interfere with the SSH configuration changes. You can check the current SELinux status with:
If it’s set to
Enforcing
, try temporarily switching it toPermissive
with:Then test the SSH connection again.
If you still can’t log in with a password, check
/var/log/auth.log
(on Ubuntu) or/var/log/secure
(on CentOS) for messages that might give a clue about why the password login is failing.Regards
Hey there!
To enable password authentication on your Droplet, make sure you’ve configured the SSH settings correctly. Can you confirm that you’ve updated the
/etc/ssh/sshd_config
file and not the/etc/ssh/ssh_config
file? The former is the server-side configuration file, while the latter is the client-side configuration file.Also, after making the changes, save and close the file, then restart SSH for the changes to take effect:
Let me know if that gets things working for you!
- Bobby