SSH connection from on-premise Linux or Unix host to Oracle cloud

Problem

1.First I copied the private key generated by puttygen (The public key was provided during DB creation in oracle cloud).After that I tried to connect cloud database using below command:-

cd /home/oracle

chown oracle:oinstall course_priv.ppk

chmod 0600 course_priv.ppk

[oracle@gnssrv01 ~]$ ssh -i course_priv.ppk opc@144.21.83.108
Enter passphrase for key ‘course_priv.ppk’:
Enter passphrase for key ‘course_priv.ppk’:
Enter passphrase for key ‘course_priv.ppk’:
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

It was asking for passphrase which I selected NULL during creation of private key using puttygen. I was not able to login .

Solution:-

1.Let me create the private key in openssh format from import/export option of puttygen

2.Now I need to import the private key generated earlier using puttygen.

3.Now this will show your public key.

4.Please export the key using “Export OpenSSH key” option

Save this key as my_priv_key and transfer to on-premise host.

5.Now you will be able to login 

[root@gnssrv01 oracle]# chown oracle:oinstall my_priv_key
[root@gnssrv01 oracle]# chmod 0600 my_priv_key
[root@gnssrv01 oracle]# su – oracle
[oracle@gnssrv01 ~]$ ssh -v -i my_priv_key oracle@144.21.83.108   (The -v option is for debug.You can omit it)