First page Back Continue Last page Summary Graphics
SSH redir syntax
% ssh -L 8001:workweb:8080 \
-L 5901:workstn:5901 \
-R 2022:localhost:22 \
-R 6011:homebox2:6000 \
-l myname mywork.com
Notes:
Here -L 8001:webwork:8080 means:
listen on tcp port 8001 on the LOCAL machine, redirect
any connections to port 8080 on a machine named
"webwork" at work (the remote side). This could be
the intranet webproxy menioned earlier.
The second option is a VNC port redir for 5901 to
view a remote vnc server running on "workstn" at
work. See VNC discussion later.
-R 2022:localhost:22 instructs the REMOTE side
(the sshd process) to listen on tcp port 2022 and redir
any connections to port 22 on the local machine.
The idea is you throw the whole command (with all
the -L and -R's and anything else) in a script, called
"vpn" say. Then when you type "vpn" and enter your
password to login it is all set up. Exit the ssh shell to
bring it all down. (be sure to terminate all redir-ed
connections