How to setup ssh tunnel using Putty

There would be instances where in we do not have direct access to Database server running in an external network, i.e we cannot open connection to the database directly from our local machine .Usually to access these databases we will have to login to another server(Bastion host) thru putty to get access to Database.But what if I want to access the Database instance using a GUI tool like sql developer?
This is where ssh tunneling(also known as port forwarding) would come in handy.

What is Tunneling?

Tunneling allows a network user to access or provide a network service that the underlying network does not support or provide directly.
A tunnel is exactly as the name suggests, a tunnel over SSH on which we’ll forward a specific port. The port will be accessible on your local machine, but will be automatically forwarded to the remote machine so it appears as if you’re remote service (MySQL in this case) is actually local. This doesn’t just have to work with MySQL, it can be used for any TCP based service, such as HTTP on port 80.

How to set up tunneling in putty?

  1. In putty create a session for the server which has access to MySql Server
  2. Add tunneling information by clicking on Tunnels under Connection=>SSH=>Tunnels
    Source port Field: Key in the port on which you want to access the mysql server from localhost(I chose 9999 port).
    Destination Field: Key in the IPAddress of the mysql server with the port Eg :
    Click on Add button
  3. Click on Session(left top) and save.Then open the session.
  4. Now login to the box using putty with appropriate credentials.To connect to the remote mysql server using SQLDeveloper(or any other similar software) we should connect to localhost:9999 .

One thought on “How to setup ssh tunnel using Putty

  1. Frank

    Hey there! I’ve been following your website for
    a while now and finally got the bravery to go ahead
    and give you a shout out from Porter Texas! Just wanted to say keep
    up the excellent job!

  2. HowardGot

    Your comment is awaiting moderation.

    Seriously a lot of excellent material.
    prescription without a doctor’s prescription canadian pharmacies online prescription without a doctor’s prescription [url=]mexican pharmacies shipping to usa[/url]
    best canadian mail order pharmacies
    best canadian online pharmacy
    top rated canadian pharmacies online
    online pharmacy no prescription needed
    no prescription online pharmacy
    prescription cost

  3. HowardGot

    Your comment is awaiting moderation.

    Helpful write ups. Appreciate it.
    best canadian online pharmacy canadian pharmacies without an rx online canadian discount pharmacy [url=]aarp approved canadian online pharmacies[/url]
    canadian pharma companies
    prescription drugs online without doctor pharmacy
    candrugstore com
    canadian online pharmacies
    mexican pharmacy online medications

  4. QuentinJit

    Your comment is awaiting moderation.

    Excellent knowledge. With thanks.
    online canadian discount pharmacy canadian online pharmacies canada pharmacies online prescriptions [url=]canadian pharmacies that ship to us[/url]
    canada drug prices
    pharmacy canada
    canadian rx pharmacy online
    approved canadian pharmacies online
    canada pharmacies without script
    <a href="”>online canadian pharmacies

  5. QuentinJit

    Your comment is awaiting moderation.

    Nicely put. Many thanks!
    canadian pharmacies online mexican pharmacies shipping to usa online pharmacy no prescription needed [url=]canadian pharmacies online[/url]
    highest rated canadian pharmacies
    online pharmacy without prescription
    prescription drug
    canadapharmacyonline com
    top rated online canadian pharmacies
    best online pharmacies no prescription

  6. QuentinJit

    Your comment is awaiting moderation.

    You made your position quite clearly..
    canadian pharmacies that ship to us top rated canadian pharmacies online rx pharmacy [url=]canadian viagra[/url]
    canadian pharmacy meds
    pharmacies near me
    web medical information
    canadian pharmacies top best
    <a href=",+Kudos.+ Development&fname=QuentinWer&lname=QuentinWer& Many thanks, Ample facts! global pharmacy canada online pharmacies canada compare prescription prices canada pharmaceuticals online drugs without prescription pharmacy prices canadian mail order pharmacies canadian family pharmacy canadian prescription drugstore online drugs“>buy prescription drugs without doctor
    canadian drugstore reviews

  7. QuentinJit

    Your comment is awaiting moderation.

    Whoa tons of good material!
    online drugstore london drugs canada cheap canadian drugs [url=]canadian pharmacy[/url]
    canadian pharmacy uk delivery
    walmart pharmacy price check
    overseas pharmacy forum
    canadian pharmacies online prescriptions
    discount prescription drugs online
    <a href="[re_captcha]=&submit=%D0%9E%D1%82%D0%BF%D1%80%D0%B0%D0%B2%D0%B8%D1%82%D1%8C”>ed meds online

  8. QuentinJit

    Your comment is awaiting moderation.

    Thank you. Good stuff!
    best online pharmacies canada canadianpharmacy best online pharmacies canada [url=]canada drugs[/url]
    <a href="”>online pharmacy reviews
    pharmacy online
    pharmacies near me
    pharmacy online mexico
    approved canadian pharmacies online
    canada drugs pharmacy


Leave a Reply

Your email address will not be published. Required fields are marked *