In general, an SSH tunnel can map a remote port to any available port number on your local computer. Some protocols, such as Java Remote Method Invocation (RMI), require that the remote and local port numbers be the same value.
- Access your service console.
- Click the name of the service instance that contains the node that you want to access.
- On the Overview page, identify the Public IP address of the node that you want to access.For example,
- From your computer, run the
sshcommand to create an SSH tunnel to the node as the
opcuser.Provide the following:
The path to the private key that corresponds to the public key that you specified when you created this service instance.
The node’s public IP address.
The port number on the node to which you want to connect. The SSH tunnel enables connectivity to this remote port by using the port with same number on your local computer.
The command format is:
ssh -i path_to_private_key -L port:node_IP_address:port opc@node_IP_address -N
ssh -i /home/myuser/id_rsa -L 9001:203.0.113.13:9001 email@example.com -N
- If prompted, enter the passphrase for the private key.
Applications that are running on your local computer can now communicate with the node by using
port is the local port number.
After your work with the SSH tunnel is completed, press Ctrl+C to close the SSH tunnel.