examples:

$ vim .ssh/config


Host ebal3
	Hostname 158.255.214.14
	Port 2222

Host 192.168.0.153
	ProxyCommand ssh vpn.example.com -p 2222 nc %h %p

Host myhomepc
	ProxyCommand ssh 1.2.3.4 nc %h %p
	Hostname 5.6.7.8
	User ebal
	Port 12345
	Compression yes



ssh -L 8080:localhost:8080 proxy.example.com

ssh -NCD 8080 gateway_machine

ssh -L 8080:proxy.example.com:8080 -L 1993:imap.gmail.com:993 -L 1465:smtp.gmail.com:1465  work_machine

@work: ssh -R 9999:localhost:22 home_machine
@home: ssh localhost -p 9999