SSH Passwordless Login Using SSH Keygen in 5 Easy Steps

NB: Follow this guide for Jenkins CD

Using Password-less login with SSH keys will increase the trust between two Linux servers for easy file synchronization or transfer.

SSH Client : 
SSH Remote Host : 

In this example, we will set up SSH password-less automatic login from server as user bob to with user fred. Please note that ALL commands are run via the SSH Client

Step 1: Create Authentication SSH-Keygen Keys on

ssh-keygen -t rsa

Step 2: Create .ssh Directory on – (via

ssh -p 22 fred@ mkdir -p .ssh

Step 3: Upload Generated Public Keys to – (via

cat .ssh/ | ssh -p 22 fred@ 'cat >> .ssh/authorized_keys'

Step 4: Set Permissions on – (via

ssh -p 22 fred@ "chmod 700 .ssh; chmod 640 .ssh/authorized_keys"

Step 5: Login from to Server without Password

ssh -p 22 fred@