Remember port SSH port fowarding

If you can reach a box over SSH (and tunnelling is not disabled), then you can create a tunnel like this.

ssh -L localport:localhost:remoteport remotemachine

where localhost is 127.0.0.1 on the remote machine, remoteport is in whatever port on the remotemachine to want to map to the localport on your localmachine.

ssh -L localhost:remotemachine:remoteport middlemachine

where you can get to the remote machine from another machine in the middle, this way you can gain access to the remoteport on remotemachine when you may not have a login there.

Author: Andrew

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.