我不想在流浪机器上创建新的SSH密钥对,而是使用agent forwarding重用我在主机上拥有的密钥对。我尝试在Vagrantfile中将config.ssh.forward_agent设置为TRUE,然后重启虚拟机,并尝试使用:
vagrant ssh -- -A
...but当我尝试进行git结账时,仍然会收到输入密码的提示。知道我错过了什么吗?
发布于 2012-08-23 14:10:08
将其添加到Vagrantfile中
Vagrant::Config.run do |config|
# stuff
config.ssh.forward_agent = true
end
发布于 2013-07-26 21:55:11
除了将"config.ssh.forward_agent = true“添加到vagrant文件之外,还要确保主机计算机已设置为代理转发。Github为此提供了一个good guide。(查看故障排除部分)。
发布于 2014-03-14 08:53:00
我在1.4.3版本上使用了上面的回复,但在1.5版本上停止了工作。我现在必须运行ssh-add
才能完全使用1.5。
现在,我将以下行添加到我的ansible配置脚本中。- name: Make sure ssk keys are passed to guest. local_action: command ssh-add
我还创建了我的设置要点:https://gist.github.com/KyleJamesWalker/9538912
https://stackoverflow.com/questions/11955525
复制相似问题