Oracle applications - Surendranath Subramani: SSH key for EBS environment

Saturday, November 28, 2015

SSH key for EBS environment


Establish SSH connection between 2 servers to exchange files:

In Oracle EBS you may come across scenario to exchange files between 2 systems. 
Example: it could be sending CTX file to bank or receiving credit card transaction file from bank.

We will go over basic steps which is required to achieve the file transmission functionality.

Create SSH key

a. To start with we need to SSH Key in the source system.

Go to application server (middle tier) and type below command from command line. 
——————————————————————————————————
ssh-keygen
——————————————————————————————————
You will be prompted to supply file name (for saving the key pair) and passphrase.

Preferred location to store your key pair is ~/.ssh

after completion of generating key, now you see 2 files created 
> private key (without extension)
> Public key (with extension .pub)

b. Download public key to your local using scp or ftp.

c. Transfer public key to remote (target) system through email.

d. In the remote system: the key need to be installed.

Add the public key to authorized_key file located in ~/.ssh folder

Lets say your public key file name is id_rsa.pub then using below command the public key content will be added to authorized key file.

Authorized file will lets the server authenticate the client, if the public key is not added to this file then client can not connect to remote server.

——————————————————————————————————
cat ~/id_rsa.pub >> ~/.ssh/authorized_key 
——————————————————————————————————

e. Since we are all set with the remote server settings, now it is time to test the connection.


When you try to connect first time it will prompt to add the known_host file.
This file is located in ~/.ssh/known_host in the client (source) machine. This file will keep the record of different connection you establish. 

Known host will lets the client authenticate the server

If you have set passphrase while creating key then during connection you will be prompted to enter passphrase. 
If you have not set passphrase then you can connect without passphrase

Note: Since we are making secure FTP connection using key pair most of the time it is good to create key without passphrase so that it will be easy to programmatically connect and ftp the files between client and remote machine.


Thanks for reading my blog. Have a wonderful day!!!



No comments:

Post a Comment