title: Jenkins won't deploy - SSH server 'Host key Verification failed'
body: <p>I'm deploying an app from git to a target server with Jenkins. I've set in my project a new Jenkinsfile which its stage('deploy') is pointing at the right machine. The conection would happen through SSH.</p>
  
  <p>I've been reading for the deployment to succesfully run, <strong>both machines</strong> (git &amp; target server) must know each others Host keys, which are stored in known_hosts at ~/.ssh/ . Therefore I connected through ssh from the git machine to the server (prompted if I wanted to continue establishing the connection, 'yes'):</p>
  
  <ul>
  <li>checked the known_hosts file in git server to find the target server entry.</li>
  <li>checked the known_hosts file at target server to find an entry, which looks like |1|KCIHm6...lo= ecdsa-sha2-nistp256 AAAA...(bla bla). </li>
  </ul>
  
  <p>I think it's all set for Jenkins to be able to deploy on server, but everytime I build the project from Jenkins, the moment the first ssh deploy command is ran, the deployment fails with a 'Host key Verification failed' message. I can navigate through the target server no matter if I connect through my local machine or the git server, I've tried redoing the process but I can't really replicate the first connection.</p>
  
  <p>Any suggestion is appreciated. Thanks in advance.</p>