

- #SETUP SSH TUNNEL IN PUTTY HOW TO#
- #SETUP SSH TUNNEL IN PUTTY MANUAL#
- #SETUP SSH TUNNEL IN PUTTY SOFTWARE#
I am explaining with respect to Oracle database but it can be used in other stuff also We will see How do I create a SSH tunnel in PuTTY in details with clear steps.
#SETUP SSH TUNNEL IN PUTTY HOW TO#
Here in this article we will concentrate on ssh tunnel with putty and check How to create an SSH tunnel in PuTTY to connect to Oracle database on Cloud How do I create a SSH tunnel in PuTTY to connect to Oracle cloud database Several SSH clients are freely available, including the SSH utility on Linux platforms and the PuTTY utility on Windows platforms.
#SETUP SSH TUNNEL IN PUTTY SOFTWARE#
You can either ask your cloud service administrator to open ports or, as you will learn in this tutorial, you can use SSH client software to create an SSH tunnel to connect securely to the database and its tools. This access restriction ensures that the instance is secure by default.
#SETUP SSH TUNNEL IN PUTTY MANUAL#
(Don't worry about the difference I have to look it up in the manual every single time I need it.When a oracle database cloud instance is created, network access to the instance is limited to Secure Shell (SSH) connections on port 22. The -L says that programs will attempt to connect Locally, and the -R says that programs will attempt to connect Remotely. It took me years to get the hang of the difference between -L and -R connection forwarding. Programs on your server (or elsewhere on the server's network) must be able to connect to server:6000 (or server's routable address, port 6000) to initiate the connection. With this command, a program on the laptop must be listening to port 7000 for connections. If you wanted it to be open to all machines that can contact the server, then you could use ssh -R *:6000:localhost:7000. By default this is only open to connections initiated on the server machine. If you want connections made to server:6000 to be forwarded to laptop:7000, then you could use ssh -R 6000:localhost:7000. Programs on your laptop (or elsewhere on your local network) must be able to connect to your localhost:7000 (or your machine's non-routable address, port 7000) to initiate the connection. With this command, a program on the server must be listening to port 6000 for connections. This restricts the port on your laptop to connections initiated on the laptop itself. If the connections originate on your laptop then you could slightly amend this to: ssh -L localhost:7000:server:6000. If you want connections made to laptop:7000 to be forwarded to server:6000, then you could use ssh -L 7000:server:6000. Since I don't know putty, I'll give the corresponding commands from OpenSSH hopefully it'll be easy to find the corresponding options in the GUI config boxes of putty. The connection will always be initiated from your laptop (because it cannot be directly addressed from the other machine) but you will use one or the other connection forwarding arguments based on how you want the port forwarding to work. The direction of your arrows has no relationship to which machine has publicly routable IP addresses - you need to know which direction you want your arrow to go based on the problem you're trying to solve.
