Source IP: 10.11.1.109
Destination: 10.11.1.98
Step 1. Login into 10.11.1.109 server
Create Authentication SSH-Kegen Keys on
[oracle@Said-Server ~]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oracle/.ssh/id_rsa.
Your public key has been saved in /home/oracle/.ssh/id_rsa.pub.
The key fingerprint is:
84:2b:b3:20:79:ec:c2:65:0a:0d:b5:34:c3:33:d7:ff oracle@Said-Server
The key's randomart image is:
+--[ RSA 2048]----+
| .= . |
| o++. .. |
|. .+ ... |
| = o. |
|+ =oo . S. |
|o++. + E |
|.o. . |
| . |
| |
+-----------------+
[oracle@Said-Server ~]$
Step 2: Create .ssh directory in 10.11.1.98 server
[oracle@Said-Server ~]$ ssh oracle@10.11.1.98 mkdir -p .ssh
oracle@10.11.1.98's password:
[oracle@Said-Server ~]$
Step 3: Upload Generated public key to 10.11.1.98 server
[oracle@Said-Server ~]$ cat .ssh/id_rsa.pub | ssh oracle@10.11.1.98 'cat >> .ssh/authorized_keys'
oracle@10.11.1.98's password:
[oracle@Said-Server ~]$
Step 4: set permission on 10.11.1.98 server
[oracle@Said-Server ~]$ ssh oracle@10.11.1.98 "chmod 700 .ssh; chmod 640 .ssh/authorized_keys"
[oracle@Said-Server ~]$
Step 5: Login from 10.11.1.106 to 10.11.1.98 server without password
[oracle@Said-Server ~]$ ssh oracle@10.11.1.98
Last login: Tue Feb 19 09:33:29 2019 from 10.11.208.115
[oracle@ncbsstd ~]$
No comments:
Post a Comment