An SSH tunnel to an Oracle Java Cloud Service VM enables you to connect to other non-public ports on the VM though a port your local machine.
If a resource provided by a VM uses a port that is not directly accessible through the Internet, you can access that resource by creating an SSH tunnel to the port. For example, you can use an SSH tunnel to connect a local Integrated Development Environment (IDE) such as Eclipse to the dedicated deployment port (9001) of the Administration Server.
In general an SSH tunnel may map a remote port to any available port number on your local machine. However, port 9001 on the Administration Server uses JMX/RMI for communication, which requires that the remote and local port numbers be the same value. Therefore, the following instructions configure the tunnel’s local port number to the same value as the VM’s port number.
To set up an SSH tunnel to a VM:
Note:The console displays public IP addresses only for the Administration Server and the Load Balancer VMs, not for the managed server VMs. For more information, see Connecting to a Managed Server VM.
ssh) to create an SSH tunnel to the VM.
The path to the private key corresponding to the public key used at the time of provisioning.
The VM’s public IP address.
The port number on the VM to which you want to connect. The SSH tunnel will enable connectivity to this remote port though the same port number on your local machine.
in this format:
ssh -i path_to_private_key -L port:VM_IP_address:port opc@VM_IP_address -N
ssh -i /home/myuser/id_rsa -L 9001:220.127.116.11:9001 firstname.lastname@example.org -N
To download PuTTY, go to http://www.putty.org/ and click the You can download PuTTY here link.
.ppkfile extension indicates that the private key is in PuTTY's proprietary format. You must use a key of this format when using PuTTY. If you have to use a key saved in a different format, see the PuTTY documentation.
Note:You can optionally save this session configuration by navigating to the Session panel and clicking Save. When you open PuTTY the next time, you can load this configuration by selecting it and clicking Load.
Applications running on your local machine can now communicate with the VM by using
localhost:port, where port is the local port number.
For example, after creating an SSH tunnel to port 9001 on the Administration Server VM, launch a web browser and connect to
Note:After your work with the SSH tunnel is complete, perform a
<ctrl> Cto shut down the SSH tunnel.