### Default settings
Host *
ServerAliveInterval 180
ServerAliveCountMax 999
AddressFamily inet
### server config example
Host appdev
Hostname appdev.server.com
Port 22
User loginUserName
IdentityFile ~/.ssh/MyPrivateKey.openssh
### Tunnels configuration example. Start with ssh -f -N tunnels
Host tunnels
Hostname appdev.server.com
Port 22
User loginUserName
IdentityFile ~/.ssh/MyPrivateKey.openssh
LocalForward service1host_local:80 service1host_real:80
LocalForward service2host_local:80 service2host_real:80
...
Things to remember:
1) in hosts file there must be mapping for serviceXhost_local to unique localhost IP:
127.0.0.1 service1host_local 127.0.0.2 service2host_local ...
2) private key must be in openssh format (puttygen will do conversion)
3) remove password from private key to skip the prompt eveytime (puttygen will do conversion). But thats kind of security breach
See also:
http://nerderati.com/2011/03/17/simplify-your-life-with-an-ssh-config-file/