问题
I've added agent forwarding to my vagrant file, and now when I run vagrant ssh -c 'ssh-add -l'
I see a list of ssh keys, which is correct. However, when I run vagrant ssh
to connect and then run ssh-add -l
, I don't see any keys! It looks like the forwarding only works for commands included as part of the initial call, otherwise it doesn't forward them.
What is going on here? How do I get it to forward the keys consistently, for all ssh connections to vagrant?
来源:https://stackoverflow.com/questions/33611015/vagrant-ssh-agent-forwarding-only-works-for-inline-commands