Saturday, December 11, 2010

user equivalence or secure shell for remote installation

User equivalence:
vi /etc/hosts.equiv and add following two lines (node name).
pind33
pind34

test it using rsh (remote shell):
rsh pind33 uname –r
rsh pind34 uname –r


secure shell (ssh)
applptch@pind33(PTCH_806_BALANCE/Web:Forms:MWA):$ /usr/bin/ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/applptch/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/applptch/.ssh/id_dsa.
Your public key has been saved in /home/applptch/.ssh/id_dsa.pub.
The key fingerprint is:
17:ce:1d:66:0d:25:01:fa:a9:70:fa:d9:d2:04:a0:c1 applptch@pind33.powellind.com
[~]:[time 14:15:03]

applptch@pind34(PTCH_806_BALANCE/Web:Forms:MWA):$ /usr/bin/ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/applptch/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/applptch/.ssh/id_dsa.
Your public key has been saved in /home/applptch/.ssh/id_dsa.pub.
The key fingerprint is:
5c:ad:ca:aa:93:e7:b0:92:66:92:c4:6b:09:3c:8f:f0 applptch@pind34.powellind.com
[~]:[time 14:15:40]

applptch@pind33(PTCH_806_BALANCE/Web:Forms:MWA):$ ssh pind33 "cat /home/applptch/.ssh/id_dsa.pub" >> /home/applptch/.ssh/authorized_keys
applptch@pind33's password:
[~]:[time 14:16:58]
applptch@pind33(PTCH_806_BALANCE/Web:Forms:MWA):$ ssh pind34 "cat /home/applptch/.ssh/id_dsa.pub" >> /home/applptch/.ssh/authorized_keys
applptch@pind34's password:
[~]:[time 14:17:19]
applptch@pind33(PTCH_806_BALANCE/Web:Forms:MWA):$ scp /home/applptch/.ssh/authorized_keys pind34:/home/applptch/.ssh
applptch@pind34's password:
authorized_keys 100% 1336 1.3KB/s 00:00
[~]:[time 14:17:56]
applptch@pind33(PTCH_806_BALANCE/Web:Forms:MWA):$ ssh pind34
Last login: Wed Sep 15 14:13:53 2010 from 172.18.33.73
[~]:[time 14:18:26]
applptch@pind34(PTCH_806_BALANCE/Web:Forms:MWA):$

applptch@pind34(PTCH_806_BALANCE/Web:Forms:MWA):$ ssh pind33
Last login: Wed Sep 15 14:24:10 2010 from pind34.powellind.com
[~]:[time 14:26:51]
applptch@pind33(PTCH_806_BALANCE/Web:Forms:MWA):$

No comments:

Post a Comment