Step 1:
[root@pravi ~]# yum install openssh-clients -y
[root@pravi ~]# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
e7:55:ae:cd:e0:b3:91:4a:36:53:a7:d7:62:d2:9a:d8 root@master.techvantage.com
The key's randomart image is:
+--[ RSA 2048]----+
| |
| |
| . |
| o |
| S . + o |
| o + X . |
| * O B .|
| o * X . |
| o E |
+-----------------+
~/.ssh/id_rsa [private key]
~/.ssh/id_rsa.pub [public key]
Step 2:
[root@master ~]# ssh-copy-id -i ~/.ssh/id_rsa.pub <slave-ip>
Now try logging into the machine, with "ssh 'slave'", and check in:
.ssh/authorized_keys
to make sure we haven't added extra keys that you weren't expecting.
Step 3
[root@master ~]# ssh <slave-hostname>
[root@pravi ~]# yum install openssh-clients -y
[root@pravi ~]# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
e7:55:ae:cd:e0:b3:91:4a:36:53:a7:d7:62:d2:9a:d8 root@master.techvantage.com
The key's randomart image is:
+--[ RSA 2048]----+
| |
| |
| . |
| o |
| S . + o |
| o + X . |
| * O B .|
| o * X . |
| o E |
+-----------------+
~/.ssh/id_rsa [private key]
~/.ssh/id_rsa.pub [public key]
Step 2:
[root@master ~]# ssh-copy-id -i ~/.ssh/id_rsa.pub <slave-ip>
Now try logging into the machine, with "ssh 'slave'", and check in:
.ssh/authorized_keys
to make sure we haven't added extra keys that you weren't expecting.
Step 3
[root@master ~]# ssh <slave-hostname>
No comments:
Post a Comment