localhost
below is meant to be used literally.
laptop_srv -- wifi_1
> server
laptop_clt -- wifi_2
-
laptop_srv
: laptop with SSH server to log into -
laptop_clt
: laptop to use with SSH client -
wifi_1
andwifi_2
: access points -
server
: remote server accessible via SSH from bothlaptop_srv
andlaptop_clt
ssh -R 4022:localhost:22 serveruser@server
Also see http://www.howtoforge.com/reverse-ssh-tunneling.
ssh -l serveruser server
# on remote server:
ssh -l laptop_srv_user localhost -p 4022