Sunday, April 15, 2007

use ssh tunnel when other application can not establish a stable connection

Recently I worked from home, to communicate with my mates, my company use IRC and there is an IRC server set up on office server. I use irssi as my IRC client. All work well until I change my work place from my home in BeiJing to my wife's hometown(FuJian).

It seems irssi can not establish a stable connection to the IRC server in office. At first, I tried ssh to my computer in office and run irssi there. It works but there is some problems: I tweak a script that use Growl to notify me whenever there is a IRC message for me, and with Sound notification. It work very well locally, but not work well remotely, there is a delay for the sound playing(I use esound to play sound effect file). Later, I got another solution from greg(thanks!), building an ssh tunnel for IRC server, then I can run irssi locally. After I gave it a try, it worked very well! To make the ssh tunnel, run command: $ ssh -Nf -L 6667:IRC_SERVER:6667 GATEWAY_IN_OFFICE

Then in irssi, connect to "localhost" as the IRC server. It seems ssh does a really good work on network connection. Thank you, SSH! ;)

No comments: