DEV Community

Daniel Pepuho
Daniel Pepuho

Posted on • Edited on

Configure SSH passwordless

Now i can show how to configure SSH passwordless on Ubuntu Server. You can use SHH passwordless when you need to login without authentication. You need to config this on your host or laptop, not in VM or server side.

$ ssh-keygen

Generating public/private rsa key pair.
Enter file in which to save the key (/home/ansible/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/ansible/.ssh/id_rsa.
Your public key has been saved in /home/ansible/.ssh/id_rsa.pub.

$ ssh-copy-id demo@172.16.238.20
$ ssh-copy-id demo@172.16.238.10

Enter fullscreen mode Exit fullscreen mode

after that, now you can login to Ubuntu Server without any authentication

$ ssh demo@172.16.1.20
Enter fullscreen mode Exit fullscreen mode

Top comments (0)