{"action":"opened","issue":{"url":"https://api.github.com/repos/mitchellh/vagrant/issues/6687","labels_url":"https://api.github.com/repos/mitchellh/vagrant/issues/6687/labels{/name}","comments_url":"https://api.github.com/repos/mitchellh/vagrant/issues/6687/comments","events_url":"https://api.github.com/repos/mitchellh/vagrant/issues/6687/events","html_url":"https://github.com/mitchellh/vagrant/issues/6687","id":122971140,"number":6687,"title":"SSH Agent forwarding not working for Mac and Linux","user":{"login":"marcofranssen","id":694733,"avatar_url":"https://avatars.githubusercontent.com/u/694733?v=3","gravatar_id":"","url":"https://api.github.com/users/marcofranssen","html_url":"https://github.com/marcofranssen","followers_url":"https://api.github.com/users/marcofranssen/followers","following_url":"https://api.github.com/users/marcofranssen/following{/other_user}","gists_url":"https://api.github.com/users/marcofranssen/gists{/gist_id}","starred_url":"https://api.github.com/users/marcofranssen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcofranssen/subscriptions","organizations_url":"https://api.github.com/users/marcofranssen/orgs","repos_url":"https://api.github.com/users/marcofranssen/repos","events_url":"https://api.github.com/users/marcofranssen/events{/privacy}","received_events_url":"https://api.github.com/users/marcofranssen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-18T15:44:06Z","updated_at":"2015-12-18T15:44:06Z","closed_at":null,"body":"Hi, I seen a few closed tickets regarding SSH Agent forwarding which was not working.\r\n\r\nNow I'm kind of in the situation where Agent forwarding does work except for the shell provisioning on Linux and Mac. So on Windows it works flawlessly. On Linux it only works afterwards when you do vagrant ssh.\r\n\r\nAs our shell provisioners do need to clone some git repos we require the ssh agent forwarding to be working.\r\n\r\nIt is a debian wheezy box build from our existing virtualbox image. As you can see we use the root user to login.\r\n\r\n```Ruby\r\nVagrant.configure(\"2\") do |config|\r\n  config.ssh.username = \"root\"\r\n  config.ssh.forward_agent = true\r\n  \r\n  config.vm.provider :virtualbox do |vb|\r\n    vb.name = box_name\r\n    # vb.gui = true\r\n  end\r\n\r\n  config.vm.provision \"shell\", path: \"init.sh\"\r\nend\r\n```\r\n\r\nWould be great if someone has some ideas on how to tackle this. Either as workarround, or a potential fix for vagrant.\r\n\r\nWe do have the ssh key loaded in the ssh-agent. So when on linux following command will show that the key is loaded.\r\n\r\n`ssh-add -l`\r\n\r\nWhen doing `vagrant ssh` after provisioning it also proves it is there as we then can just clone fine.\r\n\r\nOn Windows the key is available in putty agent."}}