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 :10.20.30.40:3306
    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!

    Reply
  2. HowardGot

    Your comment is awaiting moderation.

    Seriously a lot of excellent material.
    http://www.canadianpharmacymsn.com/
    prescription without a doctor’s prescription canadian pharmacies online prescription without a doctor’s prescription [url=http://canadianpharmacyntx.com/]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

    Reply
  3. HowardGot

    Your comment is awaiting moderation.

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

    Reply
  4. QuentinJit

    Your comment is awaiting moderation.

    Excellent knowledge. With thanks.
    http://www.canadianpharmacymsn.com/
    online canadian discount pharmacy canadian online pharmacies canada pharmacies online prescriptions [url=http://talahicc.com/]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="http://inv4zi0n.blogspot.com/mailto:viiih.dellicious@gmail.com?subject=canada+pharmacy+online+orders+tofs&body=+You+have+made+the+point%21+http%3A%2F%2Fcanadianonlinepharmacynnm.com%2F+northwest+pharmacy+northwestpharmacy+compare+rx+prices+%5Burl%3Dhttp%3A%2F%2Fcanadianpharmacysilo.com%2F%5Dcanada+pharmacy%5B%2Furl%5D+%0D%0Acanadadrugs.com+pharmacy+%0D%0Acanada+pharmacies+%0D%0Adrugs+without+prescription+%0D%0Acanada+meds+%0D%0Alegitimate+online+pharmacies+%0D%0Apharmacy+online&submit=Enviar”>online canadian pharmacies

    Reply
  5. QuentinJit

    Your comment is awaiting moderation.

    Nicely put. Many thanks!
    http://canadianpharmacymim.com/
    canadian pharmacies online mexican pharmacies shipping to usa online pharmacy no prescription needed [url=http://www.canadianpharmacymsn.com/]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

    Reply
  6. QuentinJit

    Your comment is awaiting moderation.

    You made your position quite clearly..
    http://canadianpharmaciescubarx.com/
    canadian pharmacies that ship to us top rated canadian pharmacies online rx pharmacy [url=http://www.canadianpharmacymsn.com/]canadian viagra[/url]
    canadian pharmacy meds
    pharmacies near me
    web medical information
    canadian pharmacies top best
    <a href="http://www.nationwidemarketing.com/blog/?form2mailerror&inquiry=Business+Development&fname=LucasCep&lname=LucasCep&email=lucasBrori%40gmail.com&company=google&phone1=86354364614&phone2=86349311746&phone3=82174156283&comments=+Lovely+material,+Kudos.+http://www.canadianpharmacymsn.com/+best+online+international+pharmacies+%3Ca+href=%22https://nicktambone.com//%22%3Ecanadian+pharmacy%3C/a%3E+pharmacy+prescription+%3Ca+href=http://canadianpharmacysilo.com//%3Ecanadian+drugs%3C/a%3E?form2mailerror&inquiry=Business Development&fname=QuentinWer&lname=QuentinWer&email=zittel020eejf@songwriter.net&company=google&phone1=82659939369&phone2=84113581961&phone3=88456461232&comments= Many thanks, Ample facts! http://talahicc.com/ 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

    Reply
  7. QuentinJit

    Your comment is awaiting moderation.

    Whoa tons of good material!
    http://canadianpharmaciesnnm.com/
    online drugstore london drugs canada cheap canadian drugs [url=http://canadianpharmacyntx.com/]canadian pharmacy[/url]
    canadian pharmacy uk delivery
    walmart pharmacy price check
    overseas pharmacy forum
    canadian pharmacies online prescriptions
    discount prescription drugs online
    <a href="http://www.era.ks.ua/guestbook/show_item_add_form/?__myform_unique=a9a6586fb97dbafacb4beb1e32aba504&common%5Btitle%5D=prescription+cialis+cost+bica&common%5Bemail%5D=paille172ync%40brew-master.com&common%5Btext%5D=You+actually+revealed+this+well.+http%3A%2F%2Fcialisttk.com%2F+cialis+temoignages+generic+cialis+%0D%0Acialis+i%D0%93%C2%A7eri%D0%94%D1%9Fi+%0D%0Acialis+generic&common[re_captcha]=&submit=%D0%9E%D1%82%D0%BF%D1%80%D0%B0%D0%B2%D0%B8%D1%82%D1%8C”>ed meds online

    Reply
  8. QuentinJit

    Your comment is awaiting moderation.

    Thank you. Good stuff!
    https://nicktambone.com/
    best online pharmacies canada canadianpharmacy best online pharmacies canada [url=http://canadianpharmaciescubarx.com/]canada drugs[/url]
    <a href="https://fuszereslelek.nlcafe.hu/2018/12/06/sussunk-olajban-citromos-szirupos-turofank/#comments?sharebyemailCimzett=zittel020eejf%40songwriter.net&sharebyemailFelado=zittel020eejf%40songwriter.net&sharebyemailUzenet=+Thanks.+Quite+a+lot+of+write+ups.++http%3A%2F%2Fcanadianonlinepharmacynnm.com%2F+buy+online+prescription+drugs+canadian+cialis+%0D%0Amedication+costs+%0D%0Aglobal+pharmacy+canada&sharebyemailTitle=Sussunk+olajban%2C+citromos%2C+szirupos+turofank&sharebyemailUrl=https%3A%2F%2Ffuszereslelek.nlcafe.hu%2F2018%2F12%2F06%2Fsussunk-olajban-citromos-szirupos-turofank%2F&shareByEmailSendEmail=Elkuld”>online pharmacy reviews
    pharmacy online
    pharmacies near me
    pharmacy online mexico
    approved canadian pharmacies online
    canada drugs pharmacy

    Reply

Leave a Reply

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