0% found this document useful (0 votes)
94 views

Creating An SSH Tunnel To A Compute Node Port

To create an SSH tunnel to a port on a compute node associated with an Oracle database, you need the compute node's IP address, SSH private key, and the target port number. You then use SSH client software like ssh or PuTTY to forward the target port to a local port on your machine. This allows you to access the target port by specifying localhost and the local port number after establishing the SSH tunnel connection.

Uploaded by

user1230
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
94 views

Creating An SSH Tunnel To A Compute Node Port

To create an SSH tunnel to a port on a compute node associated with an Oracle database, you need the compute node's IP address, SSH private key, and the target port number. You then use SSH client software like ssh or PuTTY to forward the target port to a local port on your machine. This allows you to access the target port by specifying localhost and the local port number after establishing the SSH tunnel connection.

Uploaded by

user1230
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Creating an SSH Tunnel to a Compute Node Port

To create an SSH tunnel to a port on a compute node associated with Oracle Database Classic
Cloud Service, you use Secure Shell (SSH) client software that supports tunneling.

Several SSH clients that support tunneling are freely available. The following sections show
how to use SSH clients on the Linux and Windows platforms to connect to a compute node
using an SSH tunnel.

Creating an SSH Tunnel Using the ssh Utility on Linux

The Linux platform includes the ssh utility, an SSH client that supports SSH tunneling.

Before you use the ssh utility to create an SSH tunnel, you need the following:

 The IP address of the target compute node.

The IP addresses associated with a database deployment on Oracle Database Classic


Cloud Service are listed on the details page associated with the database deployment.
See Viewing Detailed Information for a Database Deployment.

 The SSH private key file that pairs with the public key used during the database
deployment creation process.
 The port number for which you want to create an SSH tunnel.

To create an SSH tunnel for a port using the ssh utility on Linux:

1. In a command shell, set the file permissions of the private key file so that only you
have access to it:

 $ chmod 600 private-key-file

private-key-file is the path to the SSH private key file that matches the public key used
during the database deployment creation process.

 Run the ssh utility:


2. $ ssh -i private-key-file -L local-port:target-ip-address:target-port
opc@target-ip-address

where:

 private-key-file is the path to the SSH private key file.


 local-port is the number of an available port on your Linux system. Specify
a port number greater than 1023 and less than 49152 to avoid conflicts with
ports that are reserved for the system. As a good practice, and for the sake of
simplicity, you should specify the same port number as the one to which you
are creating a tunnel.
 target-ip-address is the IP address of the target compute node in x.x.x.x
format.
 target-port is the port number to which you want to create a tunnel.
3. If this is the first time you are connecting to the target compute node, the ssh utility
prompts you to confirm the public key. In response to the prompt, enter yes.

After the SSH tunnel is created, you can access the port on the target compute node by
specifying localhost:local-port on your Linux system.

Creating an SSH Tunnel Using the PuTTY Program on Windows

PuTTY is a freely available SSH client program for Windows that supports SSH tunneling.

Before you use the ssh utility to create an SSH tunnel, you need the following:

 The IP address of the target compute node.

The IP addresses associated with a database deployment on Oracle Database Classic


Cloud Service are listed on the details page associated with the database deployment.
See Viewing Detailed Information for a Database Deployment.

 The SSH private key file that pairs with the public key used during the database
deployment creation process.
 The port number for which you want to create an SSH tunnel.

To create an SSH tunnel for a port using the PuTTY program on Windows:

1. Download and install PuTTY.

To download PuTTY, go to http://www.putty.org/ and click the You can download


PuTTY here link.

2. Run the PuTTY program.

The PuTTY Configuration window is displayed, showing the Session panel.

3. Configure SSH connectivity:


a. In Host Name (or IP address) box, enter the IP address of the target compute
node.
b. Confirm that the Connection type option is set to SSH.
c. In the Category tree, expand Connection if necessary and then click Data.

The Data panel is displayed.

d. In Auto-login username box, enter oracle.


e. Confirm that the When username is not specified option is set to Prompt.
f. In the Category tree, expand SSH and then click Auth.

The Auth panel is displayed.


g. Click the Browse button next to the Private key file for authentication box.
Then, in the Select private key file window, navigate to and open the private
key file that matches the public key used during the database deployment
creation process.
4. Add a forwarded port:
a. In the Category tree, click Tunnels.

The Tunnels panel is displayed.

b. In the Source Port box, enter the number of an available port on your system.
Specify a port number greater than 1023 and less than 49152 to avoid conflicts
with ports that are reserved for the system. As a good practice, and for the
sake of simplicity, you should specify the same port number as the one to
which you are creating a tunnel.
c. In the Destination box, enter the IP address of the target compute node, a
colon, and the port number to which you want to create a tunnel; for example,
192.0.2.100:1521.
d. Confirm that the Local and Auto options are set.
e. Click Add to add the forwarded port.

The new forwarded port appears in the Forwarded ports list.

5. In the Category tree, click Session.

The Session panel is displayed.

6. In the Saved Sessions box, enter a name for this connection configuration. Then, click
Save.
7. Click Open to open the connection.

The PuTTY Configuration window is closed and the PuTTY window is displayed.

8. If this is the first time you are connecting to the target compute node, the PuTTY
Security Alert window is displayed, prompting you to confirm the public key. Click
Yes to continue connecting.

After the SSH tunnel is created, you can access the port on the target compute node by
specifying localhost:local-port on your system, where local-port is the source port
that you specified when creating the tunnel.

You might also like