How to load a local ssh key for remote connection from bedrock-ansible VM

@luqo33 With SSH forwarding, you shouldn’t need to load your private key in the vm.

To test whether your SSH forwarding is set up, don’t check for the private key on the vagrant vm, just see if you can SSH into the vm and connect from there to Github, etc.

If you haven’t already, look through these tips for SSH forwarding:

All the above applies to connections like this:

local machine  =ssh=>  vagrant vm     =ssh=>  git repo
local machine  =ssh=>  remote server  =ssh=>  git repo

If you’re trying to do either of these

local machine  =ssh=>  vagrant vm  =ssh=>  remote server
local machine  =ssh=>  vagrant vm  =ssh=>  remote server  =ssh=>  git repo

then I’m a little baffled why. Why not just cut out the vagrant vm middleman (i.e., connect straight local machine =ssh=> remote server)? That way you wouldn’t need to move private keys around or deal with complex forwarding chains.

1 Like