title: Authenticating a virtual machine against a Gerrit git server
body: <p>I have a CentOS 7 VM hosted on a Scientific Linux machine (Both branches are Red Hat). I'm using docker as the SW to emulate CentOS over SL. Communication between both is done through a bridge (a small VLAN) that is set up by docker itself. It is possible to create more virtual bridges between host and docker VM if necessary. I can connect my SL host to a remote git server sharing my private key through a SSH protocol, and only my private key will grant me access.</p>
  
  <p>My problem is that I cannot find the way to authenticate my hosted CentOS against the git server. I tried to copy the priv key to its .ssh folder but it doesn't work. I need probably to set up more network parameters on my CentOS or find a way to forward SSH traffic to my host machine. Any suggestions?</p>
  
  <pre><code>git clone -vvv ssh://&lt;user&gt;@&lt;server&gt;:&lt;port&gt;/project/utils
  Cloning into 'utils'...
  Enter passphrase for key '/home/&lt;user&gt;/.ssh/id_rsa': 
  Permission denied (publickey).
  fatal: Could not read from remote repository.
  
  Please make sure you have the correct access rights
  and the repository exists.
  </code></pre>
  
  <p>My .ssh folder was copied from my working git desktop PC to my VM, with same user names and permissions, as said above. The SSH test doesn't work on the host machine client neither, so I think git may redirect SSH authentication to another port. A ssh-keyscan with the URL of the Gerrit repo returns nothing, but this could be the normal procedure of a Gerrit server.</p>