use ssh private key from host in vagrant guest

前端 未结 3 2099
庸人自扰
庸人自扰 2021-02-02 12:24

I want to clone a bunch of private git repositories while provisioning a vagrant box. According to this article this should be possible using config.ssh.forward_agent = tr

3条回答
  •  眼角桃花
    2021-02-02 13:17

    Tom,

    What you're doing is fairly generic in nature and I don't think is Vagrant specific.

    Try some of the following to track down the issue:

    1. edit your /etc/ssh/sshd_config
    2. Set LogLevel debug
    3. Restart the sshd service sudo service sshd restart or /etc/init.d/sshd restart
    4. tail -f /var/log/authlog -- note, the file may be something else like /var/log/authd.log or /var/log/secure or something.
    5. Watch what happens when you connect. It should give you some indication of why it's failing.

    Again sorry, I'm not that familiar with Vagrant but I'm wondering if the provisioning script is running as another user, in which case the agent forwarding may not work as expected?

提交回复
热议问题