SSH Port Forwarding
Example:
$ ssh -fgNL 8888:apollo:8668 dave@xdroop.dhs.org
where
- f means background after authentication
- g means permit other machines to attach to the locally-forwarded port
- N means don't run a remote command
- L 8888:apollo:8668 means listen to local port 8888, then forward it to apollo's port 8668 (note that "apollo" is resolved on the remote side, not the local one)
- dave@xdroop.dhs.org means connect as user "dave" to the system "xdroop.dhs.org"
Port-Forwarding Windows Terminal Services
# ssh -L 4000:172.17.20.100:3389 dave@pluto
Then connect to localhost:4000 with your remote desktop client.