Dies ist eine alte Version des Dokuments!
Beispiel ~/.ssh/config für Zugang zu PCs im privaten Subnetz
User wyneken ForwardX11 yes ForwardAgent yes User root ForwardX11 yes ForwardAgent yes ################ # Private netzer via khedira # # You can log in as root using: # ssh -l root netzer Host netzer User wyneken Hostname netzer.physik.privat # Hostname 10.5.81.177 ProxyCommand ssh khedira.physik.uni-freiburg.de -W %h:%p ################ # Private netzer via RZ Host netzer-rz User wyneken Hostname netzer.physik.privat # Hostname 10.5.81.177 ProxyCommand ssh login.uni-freiburg.de -W %h:%p ################ # Root on private netzer # # I actually expect the "User root" to result in us logging in as root # on netzer, but for some reason this doesn't work. # # Instead use -l on the command line: # ssh -l root netzer-r Host netzer-r User root Hostname netzer.physik.privat ProxyCommand ssh -l root khedira.physik.uni-freiburg.de -W %h:%p ################ # Hosts of the from klose/p meaning klose.physik.privat Host */p User wyneken Hostname "$(dirname %h).physik.privat" # ProxyCommand ssh -W "$(dirname %h).physik.privat:%p" khedira.physik.uni-freiburg.de ProxyCommand ssh -W %h:%p khedira.physik.uni-freiburg.de ################ # Hosts jump/goal: Login to "goal" by way of "jump" Host */* ProxyCommand ssh %r@$(dirname %h) -W $(basename %h):%p ################ # General sample # "Host" can be anything, not necessarily the host name. # "User" is the username. Must be same on the jump and target host. # "Hostname" is any name that can be resolved on the jump host, # i.e. .physik.uni-freiburg.de possibly not necessary. Host test User wyneken HostName netzer.physik.privat ProxyCommand ssh login.uni-freiburg.de -W %h:%p