ssh config 跳板机可以直接跳过
核心 ProxyCommand
Host gateway
HostName $GATEWAY_HOST
Port $GATEWAY_PORT
IdentityFile ~/.ssh/id_rsa
User $GATEWAY_USER
Host target
HostName $TARGET_HOST
User $TARGET_USER
IdentityFile ~/.ssh/id_rsa
ProxyCommand ssh gateway nc %h %p 2> /dev/null # 或者 ProxyCommand ssh gateway -W %h:%p
本文来自博客园,作者:vx_guanchaoguo0,转载请注明原文链接:https://www.cnblogs.com/guanchaoguo/p/17054664.html