ssh as a proxy

Sometimes ports are blocked to your local machine and you can only get to them if you are on the client’s machine.

Let’s say you want to connect to port 21 on remote-server.com, but that port is only open to client.server.com.

ssh client.server.com -N -L 1337:remote-server.com:21

This opens port 1337 on your local machine, and fowards it to port 21 on remote-server.com, using client.server.com as a proxy.