Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to open an ssh tunnel through to an oracle database port...after much fluffing around I cant seem to get it to work.

Here is the scenario...

My Machine --> host1 --> host2 --> oracle_instance(host3)...

So i need to be able to go through host1 which knows about host2...then from host2 to the oracle_instance on host3.

This is in order to connect up my sql developer.

Therefore I should be able telnet to the local port on my machine which will in effect be forwarding traffic from the oracle_instance port...

Any help much appreciated...

share|improve this question

Add a stanza to ~/.ssh/config:

Host oracletunnel
    ProxyCommand ssh host1user@host1 nc host2 22

Then use ssh host2user@oracletunnel -L <port>:host3:<port>.

share|improve this answer
    
Hi,Thanks for your reply...but how do I exactly type this command out...? And the addition of the commands to .ssh/config...? Can you output an example ~/.ssh/config...? – LGD. Sep 8 '10 at 4:22
    
It's right up there in my answer. Open ~/.ssh/config in a text editor and add those lines. – Ignacio Vazquez-Abrams Sep 8 '10 at 9:11
    
Ok thanks a lot buddy will give it a go... – LGD. Sep 8 '10 at 23:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .