SSH login without password?

ssh authentication without password

Yeah you heard it right. Today I’m going to teach you how you can enable passwordless authentication in ssh.

You can login to your linux servers without password. How? Keep reading…

Edit the SSH main configuration file.

$ sudo vi /etc/ssh/sshd_config


PubkeyAuthentication yes


Edit this line. If you see no, change it to yes. If this line is commented out, uncomment it.

Restart ssh.

$ sudo systemctl restart sshd

In local client, create a new ssh key if you don’t have one.

$ ssh-keygen

Hit enter to all questions.

Now copy your public key and upload it to your server’s user’s home directory’s .ssh directory.

$ ssh-copy-id user@remote_host

Now you can login to your server without even asking for a password.

Here is a YouTube demonstration video.

Thanks for reading.