Intent: To be able to deploy to
lan-example.com from any dev environment; whether it be directly from the virtual OS, or any single-OS system, or even over the internet using ONE SSH key stored in Keepass. I'm currently unable to do so from within Vagrant's OS unless I explicitly generate its own key and authorize it in each of my deployment servers. I believe the way to do what I want is through User Agent Forwarding, yes?
- Windows 7 x64
- SSH key generated by puttygen:
- Keepass with Keeagent storing my SSH key. Keeagent is set to "Agent" mode
- pageant.exe is installed but is not running
- If I wish to connect to outside/internal LAN servers using my key, Putty defers to Keeagent - Putty does not store the private key locations in its configuration.
Host 192.168.55.2 ForwardAgent yes
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.network :private_network, ip: '192.168.55.2' config.ssh.forward_agent = true # Why would I need to set this if Keeagent is handling things? config.ssh.private_key_path = '~/.ssh/id_rsa_jake_mitchell.ppk' end
Guest OS (Vagrant)
- Ubuntu x64
- 192.168.55.2, accessible through host only
- No SSH keys exist in
/home/vagrant/.ssh(I removed them). The intent is to let User Agent Forwarding through the host OS (Keeagent) take care of using the key
LAN Web Host (intranet websites)
- Let's say its domain is
- It allows SSH passwordless login only using id_rsa.ppk public key
- User Agent Forwarding is enabled in sshd
What works (using Host OS): Putty, connecting to
lan-example.com without the need to explicitly reference the SSH key.
What doesn't work (using Guest OS):
ssh -v [email protected] as it shows that there aren't any keys to use.
I've noticed something about the beta version of Keeagent that allows me to set the SSH_AUTH_SOCK. I've done so, and set up an NFS share that allows the guest OS to read the file; however this doesn't change anything. How does agent forwarding even work in this type of environment? What's different about Windows that causes this to fail?