NB: Follow this guide for Jenkins CD
Password-less login with SSH keys will increase the trust between two Linux servers for easy file synchronization or transfer.
SSH Client : 192.168.0.10 SSH Remote Host : 192.168.0.11
In this example, we will set up SSH password-less automatic login from server 192.168.0.10 as user bob to 192.168.0.11 with user fred. Please note that ALL commands are run via the SSH Client 192.168.0.10
ssh-keygen -t rsa
ssh -p 22 [email protected] mkdir -p .ssh
cat .ssh/id_rsa.pub | ssh -p 22 [email protected] 'cat >> .ssh/authorized_keys'
ssh -p 22 [email protected] "chmod 700 .ssh; chmod 640 .ssh/authorized_keys"
ssh -p 22 [email protected]