Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要使用 Amazon 提供的密钥对连接到 EC2 实例,但我想转发与我的 Github 帐户关联的公钥,以便我可以从我的私有存储库中提取(使用 Fabric)。这可能吗?如果是这样,我是否需要在我想从中提取的每台远程机器上都有我的公钥?
是的。对 ssh 使用 -i 选项。以及代理和代理转发用你的github账号。
ssh -i my_aws_key_pair.pem -A myawshost
我假设从你的问题,你知道如何做整个代理的事情。顺便说一句,您可以将您的 aws 密钥对添加到您的代理ssh-add my_aws_key_pair.pem,然后您只需要执行 ssh -A。不过,这将转发两个密钥。不确定你是否想避免这种情况。
ssh-add my_aws_key_pair.pem