The user pinky enter in channel #users over ssh tunnel that start on localhost over 1234 TCP port and end on server.example.com (irc server) on port 6667 (standart IRC port)
# ssh -f -L 1234:localhost:6667 server.example.com sleep 10
# irc -c '#users' -p 1234 pinky 127.0.0.1
Multiple hops over ssh ...
# ssh -t user@server "ssh user@workstation2"
Securing RDP with SSH tunnel
The SSH client software like PuTTY can be used connect to home SSH server from the office. From your computer at the office, SSH into the home "SSH Server" with PuTTY or by executing the following command from the prompt:
ssh –p ssh.port.number firstname.lastname@example.org
You should now have a command prompt on the home "SSH Server". From there, execute the following command to enable traffic tunneling:
ssh -R 3390:home.ip.address:3389 -C -N email@example.com
This will tunnel all traffic arriving from source firstname.lastname@example.org port 3390 to destination home.ip.address port 3389. Now from your computer at the office, use your Remote Desktop client to connect to localhost:3390, this will connect you to the home computer. The Remote Desktop traffic will be tunneled over SSH. If localhost does not work, try to use 127.0.0.1:3390 on Windows XP SP1, or 127.0.0.2:3390 on Windows XP SP2. This is due to changes in TCP loopback interface that occurred in SP2.