Hot answers tagged

2

You're on the right track with tty, and the -t option gives you just that. However, unless you are actually aiming to get a tty session for interacting, leave this option off of the last ssh command in your chain. In your case you just need it on the first connection: ssh -L 5901:localhost:6000 host1 -t ssh -L 6000:localhost:5901 -N host2 Now when you use ...


1

In summary, yes, ssh tunnels send all data across the port ssh is using (which is usually port 22). However, it only sends traffic specifically sent over the port you specify (5900 in your example above). The classic example of this is tunnelling web traffic, so that a local web browser uses the tunnel to reach destination web sites. In this instance, the ...



Only top voted, non community-wiki answers of a minimum length are eligible