A B 在同一私网,用户希望将A作为跳板机登录B
user →B == user →[A →B]
简单说明:https://renzibei.com/2020/09/05/通过代理服务器ssh连接内网服务器/
首先,用户要能够连接登录上跳板机jump host A。
【可选】可以选择在跳板机内单独创建系统用户sudo用户 。
【推荐必选】用户和跳板机之间的连接推荐使用密钥连接 :ssh密钥
密钥和公钥.pub,密钥用户秘密保存,公钥发送至跳板机(any host)用以识别身份
使用git bash:ssh-keygen -t ed25519ed25519 ,具体了解:ssh 安全私钥,用户可以方便地登录host:https://www.cnblogs.com/suraer/p/8550004.html
tuHost *
ServerAliveCountMax 5
ServerAliveInterval 30
Host codeup
HostName git@
Host VPS-ip
HostName ECS-jump-IP
User hazy
Port 22
IdentityFile "D:\\Open-SSH\\id_ecs"
Host jump-to-c1m3
HostName ECS-C1M3-private-IP
User ecs-user
Port 22
ProxyJump VPS-ip
IdentityFile "D:\\Open-SSH\\id_c1m3"
IdentitiesOnly yes
ForwardAgent no
ForwardX11 no
ForwardX11Trusted no