SSH stuff

ssh -L 2222:
Makes a tunnel from localhost:2222 trough to internal address

URL in  your browser will be :

To make a tunnel for ssh to without the extra open terminal.

ssh -f -L 2222: sleep 200
Then open a ssh connection to localhost:2222 and forget about the first one

ssh localhost -p 2222

The -f switch send the process in the background for 200 seconds because of the 'sleep 200'.
If you make the new connection within 200 seconds you're on.
When you close your session with localhost:2222 after the 200 seconds, your first ssh session will die nice and clean.

If you want to make a tunnel back to yourself from a host you connect to then :

ssh -f -R 2222:localhost:80 remote sleep 200

You can then connect to remote host at port 2222 and
get port 80 at the localhost within the 200 seconds.

SCP (Secure Copy)
You can copy a file with the scp command.

Copy from you to

scp <filename><filename>

Or if your SSH server uses a non standard port.

scp -o Port=2222 <filename><filename>

Copy from to you:

scp -o Port=2222<filename> /home/user/<filename>

Note !
You do not need to define a destination filename if you want to preserve the original name.


SFTP (Secure FTP)
If you want to make a sftp session to localhost port 2222, then :
sftp -o port=2222 localhost

Some usefull link(s) :

Getting started with SSH
Creating virtual private networks with tsocks and VTun