Kopiert von hier: http://blog.koehntopp.de/archives/2703-ssh-durch-den-Gateway-Host.html
ServerAliveInterval 10
ServerAliveCountMax 3
Compression yes
HashKnownHosts no
TCPKeepAlive yes
ControlMaster auto
ControlPath ~/.ssh/ssh_control_%h_%p_%r
Host router
Hostname name.homeunix.org
User name
Port 4444
Host desktop
Hostname 192.168.1.2
User name
Port 22
ProxyCommand ssh router nc -w30 %h %p
LocalForward 6667 127.0.0.1:6667
LocalForward 1993 127.0.0.1:993
LocalForward 1587 127.0.0.1:587
LocalForward 1999 news.mein-freund.de:119
DynamicForward 1080
Host *
ForwardAgent yes
Habe ich daraus meine eigene Variante entwickelt:
Host *
ForwardAgent yes
ServerAliveInterval 10
ServerAliveCountMax 3
Compression yes
CompressionLevel 2
HashKnownHosts no
TCPKeepAlive yes
ForwardX11 yes
ControlMaster auto
ControlPath ~/.ssh/ssh_control_%h_%p_%r
Host server
HostName server.hoster.tld
User benutzer
Port 4711
LocalForward 3306 localhost:3306 # mySQL umleiten, z. B. für MySQL-Querybrowser
DynamicForward 1080 # Socks-Proxy
Host server.ipv6
AddressFamily inet6
HostName 2001::deaf:beef
User benutzer
Port 4711
LocalForward 3306 localhost:3306
Host heimserver
AddressFamily inet #ipv4
HostName heimserver.dyndns.org
Port 4711
LocalForward 127.0.0.1:8082 192.168.xxx.xxx:443 #Fritz!Box Remote administrieren ;)