SSH tunneling for dummies

June 3, 2007 at 6:54 pm

If you ever find yourself behind a corporate firewall, as I have found myself at the PIKtipi sprint in Potsdam, and need to access a remote IRC server, here is a command to tunnel the traffic over SSH:

ssh -L 6667:irc.freenode.net:6667 yourserver.com

yourserver.com is a remote server (not firewalled) that you have access to. Of course, this assumes that the local firewall is not blocking SSH on port 22, otherwise you won’t be able to access the remote server.

Then you can connect to the remote IRC server by using localhost:6667.

Or if you don’t have time to type these commands in on the terminal, you can just use IRCatwork.com.

Technorati Tags:

Auto-login to a remote machine

September 26, 2006 at 8:51 am

I often need to login to a customer’s box and get tired of typing my password all the time. Thankfully using private and public keys, I can SSH into the machine securely without needing to type in my password.

First I create a user and add him to the wheel group, so that he has sudo privileges.

useradd nate
passwd nate
usermod -G wheel nate

Then I login as this user and add my public key to the authorized keys. This public key can be found on my local machine in ~/.ssh/id_rsa.pub

cd ~
mkdir .ssh
vi .ssh/authorized_keys
chmod 700 .ssh
chmod 600 .ssh/authorized_keys

Those last two lines to change the permissions are very important.

Now I can ssh into the machine, and it won’t prompt me for a password:

ssh nate@someremotebox.com

Technorati Tags: ,

Windows XP running inside Ubuntu Linux and MacOSX

June 13, 2006 at 12:44 pm