Today I had a Unix box inside my network that I needed to allow a remote party to connect to. I didn't want to tinker with the firewall rules, so here is what I did.
ssh -R server:2222:localhost:22 username@server
What it is saying is redirect port 2222 on the server named server to port 22 on the localhost. The username@server is used to initiate the remote connection to the server that you want to do the redirection for. So to connect to your host the other party needs to ssh to the server and then ssh to localhost on that server using port 2222.
If you want to set up the port redirection from the server end you can use a -P instead of a -R.
Friday, July 18, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment