Setup password less SSH on linux

Spread the love

In this article i will explain you to how to connect remote server machine using password less login.

SSH client :
SSH remote Host :

Generate a pair key on ssh server :

ssh-keygen -t rsa
Generating public/private rsa key pair.

Enter file in which to save the key (/root/.ssh/id_rsa):

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in /root/.ssh/id_rsa.

Your public key has been saved in /root/.ssh/

The key fingerprint is:

SHA256:1Je7TcRc58MxO5C6qBJ6qy44L+nxT8xHSXfBHUpNy48 root@slave1

The key's randomart image is:

+---[RSA 2048]----+

|          .o++ooo|

|         ...+B+o=|

|       ....o+o+=.|

|      ..o .o oo o|

|       oS . oE.. |

|    o..  . . +   |

|.o  .+...   . .  |

|=.o..o..         |

|.=+++oo          |


Copy key to client machine :

ssh-copy-id -i root@
it will ask you the password.
Now you can login to client machine without password.
root@master:~# ssh
Welcome to Ubuntu 16.04.3 LTS (GNU/Linux 4.10.0-28-generic x86_64)

 * Documentation:

 * Management:

 * Support:

413 packages can be updated.

226 updates are security updates.

Last login: Wed May  2 13:58:36 2018 from
See also  How to Install and Configure Samba in Ubuntu

Leave a Comment