Wednesday, October 21, 2009

Got access to ssh but not to any other ports on the remote machine ?

Try something like this:

ssh root@my.remote-host.com -L 2000:my.remote-host.com:80 -N

This will make the remote http (port 80) available on your local machine at (in this case) port 2000.

Just point your browser at http://localhost:2000 and you are happily browsing the remote machine.

if you use the -f option like this:
ssh -f root@my.remote-host.com -L 2000:my.remote-host.com:80 -N

The process will fork in the background.

0 comments: