exemplo de .ssh / config:
Host externalserver.university-a.edu
User user-external
Host internalserver.university-a.edu
ProxyCommand ssh externalserver.university-a.edu nc -w10 internalserver.university-a.edu 22
User user-internal
Host labpc.university-a.edu
ProxyCommand ssh internalserver.university-a.edu nc -w10 labpc.university-a.edu 22
você pode substituir em alguns casos:
ProxyCommand ssh hosta.example.com nc -w10 hostb.example.com 22
por
ProxyCommand ssh hosta.example.com -W hostb.example.com:22