Posted on October 31, 2013, 2:16 pm
Suppose that you want to configure your computer to use the proxy server of your University "myuniv-proxy.lyon1.fr", but this proxy is not accessible from the outside connection, only the member of the domain "myuniversity.lyon1.fr" able to use this proxy.
By using SSH, you can crate an "ssh tunnel" by telling your PC to use that proxy.
The tow commands lines below show you how to create the "ssh tunnel"
CONNECT BY TEXT MODE
ssh -L 9091:myuniv-proxy.lyon1.fr:22 xxxxxx@myuniversity.lyon1.fr
CONNECT BY GRAPHIC MODE
ssh -X -L 9091:myuniv-proxy.lyon1.fr:22 xxxxxx@myuniversity.lyon1.fr
COMMANDE EXPLICATION
This create an "ssh tunnel" starting at "localhost:9091" through "myuniversity.lyon1.fr" to "myuniv-proxy.lyon1.fr:22"
- X : Use the tunnel in graphic mode.
- L 9091 : Open the port "9091" on "localhost".
- myuniversity.lyon1.fr : by connecting to "myuniversity.lyon1.fr".
- myuniv-proxy.lyon1.fr:22 : transfer the connection form the port 9091 to the port 22 of "proxy710.univ-lyon1.fr".
- xxxxxx : is your user account for the domaine "myuniversity.lyon1.fr"