SSH tunneling

Jurjen Bokma

February 2008

I never did this before, but an SSH tunnel is made like this: ssh -f -L 1234:localhost:902 remotehost sleep 10

The -f tells ssh to background itself just before command execution, the -L [bindaddress:]port:localhost:hostport tells ssh to encrypt and forward local connections to port on localhost to hostport on remotehost. So in this case, if vmware is listening on port 902 on remotehost, we can connect a local vmware to port 1234 on localhost, and talk to the remote server encryptedly.