Enter the SSH Tunnel. SSH tunnel could be used to create an end to end SSH connection between the local machine (LLL) and the gateway machine (GGG). Then you can access any machine (XXX) from (LLL) itself. The best part is you do not have to be root for this!
First establish the SSH tunnel connection between GGG and LLL using the following command on LLL
ssh user@GGG -L 2000:XXX:22 -N
where, 2000 is the local port on LLL which will act as
a gateway (this can be any port you want)
22 is the remote port on the machine XXX to which you
want to connect to (For example this will be 23
for telnet, 139 for SMB, 22 for SSH etc)
Now your tunnel is setup. Just connect to the machine by connecting to LLL on port 2000 - you will be automatically forwarded to connect to 22 on XXX machine!
No comments:
Post a Comment