If you are:
- working on a computer A that has an ssh client installed
- have an ssh account (username) on a computer B and you can connect to username from computer A, with the following url (or IP): b
- want to connect to a computer C but you don't have direct access (because of proxy's and/or firewalls), with the following url (or IP): c
You will be able to create an ssh tunneling or port forwarding that will work with any application connected to localhost or the local IP of your computer. Your application contacts localhost on port pA. The ssh tunnel will forward this to your desired port pC on computer C.
On computer A, open a terminal and type:
ssh -N -L pA:c:pC username@b
Then enter your pasword for username.
Now you can use your application on localhost with port pA in order to connect to c on port pC..
Example: if your account on computer B is bill, if computer B is at pc25.example.com, if computer C is at 188.8.131.52, if you want to connect to subversion on computer C on port 7935, then type in your terminal:
ssh -N -L 9686:184.108.40.206:7935 firstname.lastname@example.org
And then in a new terminal:
svn co svn://localhost:9686/repository_name
It will have the same effect as when you type:
svn co svn://220.127.116.11:7935/repository_name