有ProxyJump和ProxyCommand两种方法。
ProxyJump是一种端口转发格式,要求主板机器支持端口转发。
ProxyCommand通过SSH协议传输
在安全性方面,ProxyJump比较高。 他是端到端的加密,主板机器只通过传输,性能也可能很好。
以下两种方法的示例包括通过多个板中继并使用证书登录。 Host1预配置了本地用户证书,这也是常规方法。 通过修改配置文件. ssh/config来实现。
主机主机1主机名称192.168.0.1 port 22 useryourusernamehost 2主机名称192.168.0.2 port 22 useryourusernameidentityfile~XXX . 168.0.3端口22用户资源管理文件~~/xx.pemproxyjumphost2host host1hostname 192.168.0.1 port 22 useryourusernamehost2hostname 192.168.0.2 port 22 user yout~/XXX.pemproxycommandsshhost1- w % h : % phost host3hostname 192.168.0.3 port 22 useryourusernameidentityfile ~