假设自己的电脑是A,跳板机是B,要访问的机器是C。首先在A上生成ssh密钥,然后把公钥放到B和C上。然后在A机器上的.ssh/config
里进行如下配置:
Host B |
然后在A机器上直接ssh C
即可免密码登录C。
如果是IPv6,要这样:
Host D |
参考:
https://serverfault.com/questions/906298/ssh-proxycommand-with-same-password
假设自己的电脑是A,跳板机是B,要访问的机器是C。首先在A上生成ssh密钥,然后把公钥放到B和C上。然后在A机器上的.ssh/config
里进行如下配置:
Host B |
然后在A机器上直接ssh C
即可免密码登录C。
如果是IPv6,要这样:
Host D |
参考:
https://serverfault.com/questions/906298/ssh-proxycommand-with-same-password
Except as otherwise noted, this blog is licensed under CC BY-SA 4.0 License.
©2021-
searchstar
|
pv
|
uv
Theme Tree
by Wu Jun
Powered by Hexo