ssh -L [LPROT]:127.0.0.1:[RPORT] [RHOSTa]
Let’s say you want to piggyback on a server server1
that you have access onto another server server2.system.local
you don’t have direct access to — however server1
have access to server2.system.local
— the following command can be used:
ssh -L 8443:server2.system.local:443 server1
You do now have access to server2:443
using localhost:8443
from your own machine as long as the ssh connection to server1
is up.