Generate a key pair with ssh-keygen on Linux

17 July,2010 by Tom Collins

Follow the steps below to generate a key pair with ssh-keygen  on Red Hat Linux
Replace : myserver1 and myserver2 with your server names

#SSH on both members of the cluster – Prepare SSH
/usr/bin/ssh-keygen -f /root/.ssh/id_dsa -q -t dsa -N ""
/usr/bin/ssh-keygen -f /root/.ssh/id_rsa -q -t rsa -N ""

cat /root/.ssh/id_dsa.pub >> /root/.ssh/authorized_keys2
cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys2

#On Node 1 (UKRHDB2P02)- in other words -
ssh myserver1 cat /root/.ssh/authorized_keys2 >> /root/.ssh/authorized_keys2


#On Node 2 (UKASDB2P02)- in other words -
ssh myserver2 cat /root/.ssh/authorized_keys2 >> /root/.ssh/authorized_keys2

#test
ssh <the other server> uname -a

 Ref:Jack Vamvas(http://www.dba-db2.com)

 

Author: Rambler(http://www.dba-db2.com)

Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been saved. Comments are moderated and will not appear until approved by the author. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment on Generate a key pair with ssh-keygen on Linux

Comments are moderated, and will not appear until the author has approved them.


dba-db2.com | DB2 Performance Tuning | DBA DB2:Everything | FAQ | Contact | Copyright