SSH Client : 192.168.0.12 ( Fedora 21 )
Step 1: Create Authentication SSH-Keygen Keys on – (192.168.0.12)
[tecmint@tecmint.com ~]$ ssh-keygen -t rsa
Step 2: Create .ssh Directory on – 192.168.0.11
[tecmint@tecmint ~]$ ssh sheena@192.168.0.11 mkdir -p .ssh
Step 3: Upload Generated Public Keys to – 192.168.0.11
[tecmint@tecmint ~]$ cat .ssh/id_rsa.pub | ssh sheena@192.168.0.11 'cat >> .ssh/authorized_keys'
Step 4: Set Permissions on – 192.168.0.11
SSH Remote Host : 192.168.0.11 ( CentOS 7 )
[tecmint@tecmint ~]$ ssh sheena@192.168.0.11 "chmod 700 .ssh; chmod 640 .ssh/authorized_keys"
Step 5: Login from 192.168.0.12 to 192.168.0.11 Server without Password
[tecmint@tecmint ~]$ ssh sheena@192.168.0.11