Moneycontrol Brokerage Recos

Saturday, February 3, 2018

[Oracle Cloud] - Creating SSH Tunnel to Oracle Cloud Compute Node using PuTTY on Windows




Creating SSH Tunnel to Oracle Cloud Compute Node using PuTTY on Windows


In this blog post, I would demonstrate the steps and SSH client configuration details to enable access to Oracle Public Cloud compute node where your Oracle Database Deployment is running.

First of all, you should note down the Oracle Compute Cloud Node's IP for your target database deployment you want to connect to. Go to Oracle Database Cloud Service service page and click on the Database Deployment service name you have created, now on the Database deployment details page, you would find the IP address of its compute node.

Second, you must have the private key saved in .ppk format locally on your client machine that you downloaded while creating the database deployment or the one you might have generated on your own and equivalent to the public key used during database deployment service creation.



  • Run the PuTTY SSH client program on your local machine and enter the Public IP address of the compute Node as depicted below. Make sure you have select SSH in the connection Type region of this page.



































In category tree at left panel of the page, expand the Connection and click on Data. you would be depicted the following page. In Login Details section, you can enter oracle as a user or leave it blank if you want to enter the username at connection time over PuTTY console. Make sure you have selected "Prompt" radio box under "When username is not specified" section so that it asks for username during the SSH connection request to the compute node.



































In category tree at left panel, expand SSH and click on "Auth" , following page appears then.


Click on the Browse button under Private Key file for authentication and select the private key file(.ppk format) which is equivalent to the public key of your target cloud Compute Node.















Now, in category tree at left panel, click on the "Tunnels", following page appears. I am giving here an example of port 22. In the "Add new forwarded Port" enter 22 for "Source Port" and enter the IP Address following port number in the "Destination" box in format "ip-address:port_number and click on Add.



In the Left panel of Category tree, click on the SSH and make sure you have not selected "Don't start a shell or command at all" under Protocal options in case if you are tunneling for port 22, otherwise, you won't get a prompt to enter username and shell to play with compute Node. In case of tunneling for other ports i.e. 1521, 5500, 1158, you can check that box not to start the cell and you can access the applications running on the port.




Now, go back to the "Category" tree and click on the Sessions on the TOP, and save the SSH configuration session setting so that you won't have to do these all shit every time you want to connect to compute node or any application port.



Once you saved the SSH Tunnel configuration setting, click on "Open" button at the bottom to connect to the Compute Node, and there you are at DBAAS compute node box. 

Enter the username you want to connect with, in my case, I am connecting with oracle user.













Now, you can play with dbaascli and all other things on Oracle Public Cloud Compute Node.

2 comments:

  1. Hi,
    Thanks for the update. What to do if your ppk key is not correct . In my case it is asking for the password. How to generate this ppk from scratch ?

    ReplyDelete
    Replies
    1. Hi, You can generate a fresh pair of Keys using Keygen utility and save the public and private key pairs for use.

      Delete