How to build SSH between 2 servers as oracle user


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

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/
The key fingerprint is:
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/ erp

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


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@


Now you are logged in Target machine – erp



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.