Search results

How to build SSH between 2 servers as oracle user

You can login to a remote Linux server without entering password in 3 simple steps using ssky-keygen and ssh-copy-id as explained in this article.

Source – makb
Target – onsem

On Source – makb

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 (onsem), provide below permissions
cd /home/oracle/.ssh
chmod 600 authorized_keys

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

On Source – makb
ssh oracle@


Now you are logged in Target machine – onsem

No comments:

Post a Comment