Creating password free connection between TWO Server’s .&Connecting to server A with a private key .


Creating password free connection between TWO Server’s .

MAKE SURE ALL THE PERMISSIONS ARE  600

===============================================

Let say you are trying to make connection Between  A and B Server .

In server A and B Do the following step 1.

1.)

ssh-keygen

Creates id_rsa <private> and id_rsa.pub <public>

2.)

Copy the id_rsa.pub of A to authorized_keys of B

Copy the id_rsa.pub of B to authorized_keys of A

Connecting to server A with a private key .

===============================

In server A create the private<id_rsa> and  public key<id_rsa.pub> using ssh-keygen

Then copy the id_rsa.pub to authorized_keys

Then we can use the private key in id-rsa to ssh in to the server .

From Server B using private key of A

ssh user@xxx.xxx.xxx.xxx -i <private>

 

from server zzz.zzz.zzz.zzz

ssh-copy-id root@xxx.xxx.xxx.xxx .. Will copy the public key of this server to server  xxx.xxx.xxx.xx .

Do the vise-versa from the server xxx.xxx.xxx.xxx to get the way round get done.

About Linux Conquering Cloud

A guy who want to try out every thing ...
This entry was posted in LINUX, SSH. Bookmark the permalink.

Leave a comment