how I add password

I can add password to server In addition to key? then I can open server or with key or with password


Submit an 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.

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!

Regards, Alex