linux – SSH ForwardAgent多跳
我一直在寻找解决以下问题的解决方案,过去2个小时没有运气.
发展: 我正在使用publickey身份验证连接到我的服务器.我使用ssh-agent转发,以便不必管理公共/私有密钥. 假设我有服务器A,B和C. 如果我从LOCAL —>连接,这非常有效. A —> B. 如果我做LOCAL —它也可以很好地工作A —> C. 现在,如果我尝试LOCAL —> A —> B —> C,SSH无法从B连接到C. 值得注意的是:我连接到服务器A作为流动性,而我以root身份连接到服务器B.连接到服务器B作为流动性解决了问题,但这不是我的选择. 根据用户的建议,我每次都使用ssh -A来确保启用代理转发. 我找到了一个类似的问题,这里没有答案:Is it possible to chain ssh-agent forwarding through multiple hops? 根据@Zoredache这里:https://serverfault.com/a/561576/45671我只需要在每个中间系统上调整我的客户端配置.我相信我做了. 解决方法
要使代理转发通过多个跃点工作,您只需在每个中间系统上调整客户端配置,以便代理转发.
它可以简单地确保你的/ etc / ssh / ssh_config配置了这个.但是如果你在?/ .ssh / config中有每个客户端的配置,你可能也需要调整这些设置. Host * ForwardAgent yes 您可以查看是否发生了代理转发,或者只是添加-v选项时出现错误. $ssh -v issc@server1 OpenSSH_5.9p1 Debian-5ubuntu1.1,OpenSSL 1.0.1 14 Mar 2012 debug1: Reading configuration data /home/zoredache/.ssh/config ... debug1: Requesting authentication agent forwarding. debug1: Sending environment. Linux server1 3.11-0.bpo.2-amd64 #1 SMP Debian 3.11.8-1~bpo70+1 (2013-11-21) x86_64 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY,to the extent permitted by applicable law. Last login: Sun Dec 15 20:39:44 2013 from 10.2.4.243 issc@server1:~$ 还要验证您是否具有有效的环境变量集. issc@server1:~$export | grep SSH_AUTH declare -x SSH_AUTH_SOCK="/tmp/ssh-7VejOmKtNv/agent.57943" (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |