Wikipedia

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
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 (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@192.168.1.10

hostname
makb.oracleops-support.com

Now you are logged in Target machine – onsem

No comments:

Post a Comment