On source server side:
First generate public key using rsa
#ssh-keygen -t rsa
( here it will ask some questions, please give all default options, especially we have to press enter (leave as empty) in the passphrase option)
Copying the .pub files content from source server to target server.
scp ~/.ssh/id_rsa.pub username@destination:~/.ssh/authorized_keys
(OR)
Better we can follow the below steps
cp ~/.ssh/id_rsa.pub ~/.ssh/authorize_keys
next copy this authorize_keys file to client /root/.ssh/
scp ~/.ssh/authorize_keys username@destination:~/.ssh/.
Now client will be able to login without password.
First generate public key using rsa
#ssh-keygen -t rsa
( here it will ask some questions, please give all default options, especially we have to press enter (leave as empty) in the passphrase option)
Copying the .pub files content from source server to target server.
scp ~/.ssh/id_rsa.pub username@destination:~/.ssh/authorized_keys
(OR)
Better we can follow the below steps
cp ~/.ssh/id_rsa.pub ~/.ssh/authorize_keys
next copy this authorize_keys file to client /root/.ssh/
scp ~/.ssh/authorize_keys username@destination:~/.ssh/.
Now client will be able to login without password.
No comments:
Post a Comment