title: 多段 | SSH —

multigate-ssh

Host 10.0-public
Hostname       203.0.113.10
User           ubuntu
IdentityFile   /path/to/pem

Host 10.0-private
Hostname       10.0.0.10
User           ubuntu
IdentityFile   /path/to/pem
ProxyCommand   ssh -W %h:%p 10.0-public

Host 10.1-private
Hostname       10.1.0.10
User           ubuntu
IdentityFile   /path/to/pem
ProxyCommand   ssh -W %h:%p 10.0-private