Host proxy.machine HostName 192.168.0.3 Port 22 User username IdentityFile ~/.ssh/id_rsa ProxyCommand none CheckHostIP no ForwardAgent yes ControlMaster auto ControlPersist 10m
Host 10.0.1.* Port 22 User username IdentityFile ~/.ssh/id_rsa ProxyCommand ssh username@proxy.machine -W %h:%p
Host proxy1.machine HostName 192.168.0.3 Port 22 User username IdentityFile ~/.ssh/id_rsa ProxyCommand none CheckHostIP no ForwardAgent yes ControlMaster auto ControlPersist 10m
Host proxy2.machine HostName 1.2.3.4 Port 22 User username IdentityFile ~/.ssh/id_rsa ProxyCommand ssh username@proxy1.machine -W %h:%p CheckHostIP no ForwardAgent yes ControlMaster auto ControlPersist 10m
Host 10.0.1.* Port 22 User username IdentityFile ~/.ssh/id_rsa ProxyCommand ssh username@proxy2.machine -W %h:%p