Friday, September 6, 2013

Tunneling SSH over SSH

Here's the problem.  Let's say your network is locked down so that a server called loqued only accept connections from a single host called trapdoor.  You could constantly ssh to trapdoor and then to loqued, but it's sometimes nice to abstract this away.  Here's how:

ssh zera@trapdoor -L 9000:loqued:22 -fN
ssh -p 9000 zera@localhost