20121022

SSH SOCKS proxy configured in ~/.ssh/config (instead of Bash alias)

http://nerderati.com/2011/03/simplify-your-life-with-an-ssh-config-file/ http://linux.die.net/man/5/ssh_config

I like this better than aliases in .bashrc.
I now have in my ~/.ssh/config

Host outside
        HostName  outside.dyndns.org
        Port  2222
        User  user
        DynamicForward  3333

Host inside
        HostName  192.168.x.y
        User  user
        DynamicForward  3333
Issuing
ssh outside
now is equivalent to
ssh -D 3333 -p 2222 user@outside.dyndns.org
(I have to add -N though myself everytime if I don't want a shell... at least I could not find a respective config option.)

At first I thought I noticed some weird behavior going back and forth between aliases and the config file, but this owed more to a strict '(re-)connect allowed only thrice in 60 minutes' rule and was ok when using different destinations.