how I add password

Posted February 20, 2020 376 views
Automated Setups

I can add password to server In addition to key? then I can open server or with key or with 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

Hello, @bsdaminut

Could you please let me know if you want to have both as authentication method when connecting to your server, e.g to have the password option if you connect from machine that doesn’t have the key needed for password less login?

If you want to enable password level authentication you need to set the PasswordAuthentication to yes in the sshd config file.

What you have to do is edit the /etc/ssh/sshd_config file and provide PasswordAuthentication with a value of Yes.

vim /etc/ssh/sshd_config


PasswordAuthentication no

press i for insert mode

Change to:

PasswordAuthentication yes

Save and Close

[escape] :wq

Restart Your SSH deamon:

sudo systemctl restart ssh

Some systems make require

sudo systemctl restart sshd

Hope this helps!


  • my have ey and I need password singly.
    how I see what is new password with your exemple?

    • Hello, @bsdaminut

      If you need to login via password then you just need to follow the steps I’ve listed above. Keep in mind that this process is not changing your root or any password related to your droplet. This is simply tweaking the ssh configuration.

      Hope this helps!