How to build SSH between 2 servers as oracle user

1

Source – erpapps2
Target – erp

On Source – erpapps2
——————–

Step 1: Create public and private keys using ssh-key-gen on local-host

as oracle user
su – oracle
ssh-keygen

Enter file in which to save the key (/home/oracle/.ssh/id_rsa):
Enter passphrase (empty for no passphrase): DON’T ENTER ANYTHING
Enter same passphrase again:DON’T ENTER ANYTHING
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:
8b:58:b0:9a:e8:5e:dc:4f:a5:24:fe:ab:45:e2:ea:0f oracle@erpapps2.appsdba.info
The key’s randomart image is:
+–[ RSA 2048]—-+
| |
| |
| . |
| o |
| .o.oS. |
| ..o+o=.o. |
|. oE.+.+. |
|. . o = |
|.o.o.o.+. |
+—————–+

Step 2: Copy the public key to remote-host using ssh-copy-id

ssh-copy-id -i ~/.ssh/id_rsa.pub erp

oracle@192.168.1.10’s password:
Now try logging into the machine, with “ssh ‘192.168.1.10’”, and check in:

.ssh/authorized_keys

to make sure we haven’t added extra keys that you weren’t expecting.

On target machine (erp), provide below permissions
cd /home/oracle/.ssh
chmod 600 authorized_keys

Step 3: Login to remote-host without entering the password

On Source – erpapps2
——————–
ssh oracle@192.168.1.10

hostname
erp.appsdba.info

Now you are logged in Target machine – erp

Ref: http://www.thegeekstuff.com/2008/11/3-steps-to-perform-ssh-login-without-password-using-ssh-keygen-ssh-copy-id/

Share.

About Author

1 Comment

Reply To admin Cancel Reply

Please wait...

Subscribe to our newsletter

Want to be notified when our article is published? Enter your email address and name below to be the first to know.