Home > Unix > Passwordless SSH login between two machines.

Passwordless SSH login between two machines.

Assume I have two machine as 10.245.122.49 and 10.245.122.50.  I have a user named ‘group4’ on each machine and using this user for the following processes.
From 10.245.122.49 , trying to setup password less ssh with 10.245.122.50
 
Steps :
# Generate ssh key without any keyphrase.
$ ssh-keygen -t dsa

$ ssh group4@10.245.122.50 -p .ssh

$ cat ~/.ssh/id_dsa.pub | ssh group4@10.245.122.50 ‘cat >> .ssh/authorized_keys’

$ ssh group4@10.245.122.50 “chmod 700 .ssh; chmod 640 .ssh/authorized_keys”

# Now ssh login should work without password.

From 10.245.122.50 , trying to setup password less ssh with 10.245.122.49

Steps :
# Generate ssh key without any keyphrase.
$ ssh-keygen -t dsa

$ cat ~/.ssh/id_dsa.pub | ssh group4@10.245.122.49 ‘cat >> .ssh/authorized_keys’

$ ssh group4@10.245.122.49 “chmod 700 .ssh; chmod 640 .ssh/authorized_keys”

# Now ssh should work with 10.245.122.49.
Advertisements
Categories: Unix
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: