steps to create password-less login

On the host machines create a private and a public key pair
 
ssh-keygen -t rsa 2048
 
[this will create a ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub for the private and public keys, respectively ]
 
now copy the ~/.ssh/id_rsa.pub to the remoate system where you want passwordless login
 
scp ~/.ssh/id_rsa.pub root@192.168.0.247:/tmp

Now on the remote machine

mkdir ~/.ssh
chmod 700 ~/.ssh
cp /tmp/id_rsa.pub ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys

now on the host machine try to login iin , it shold log you in woith outh a password
You can append as many public keys  usig the >> sign

--

No comments:

Other Articles

Enter your email address: