title: Failed to add the RSA host key for IP address 'xxx' to the list of known hosts (/home/webapp/.ssh/known_hosts)
body: <p>I am trying to access git via ssh instead of hhtps in my project in aws. I followed this step <a href="https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/#platform-linux" rel="nofollow noreferrer">here</a> and added ssh key. I get following error in log.</p>
  
  <pre><code>Failed to add the RSA host key for IP address 'xxx' to the list of known hosts (/home/webapp/.ssh/known_hosts).
  </code></pre>
  
  <p>I changed ownership from ec2-user to webapp. Now I have</p>
  
  <pre><code>Warning: Permanently added the RSA host key for IP address '192.30.253.113' to the list of known hosts.
  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><code>ssh -vT git@github.com</code>  </p>
  
  <p>gives  </p>
  
  <p>OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017<br>
  debug1: Reading configuration data /etc/ssh/ssh_config<br>
  debug1: /etc/ssh/ssh_config line 58: Applying options for *<br>
  debug1: Connecting to github.com [192.30.253.112] port 22.<br>
  debug1: Connection established.<br>
  debug1: permanently_set_uid: 0/0<br>
  debug1: key_load_public: No such file or directory<br>
  debug1: identity file /root/.ssh/id_rsa type -1<br>
  debug1: key_load_public: No such file or directory<br>
  debug1: identity file /root/.ssh/id_rsa-cert type -1<br>
  debug1: key_load_public: No such file or directory<br>
  debug1: identity file /root/.ssh/id_dsa type -1<br>
  debug1: key_load_public: No such file or directory<br>
  debug1: identity file /root/.ssh/id_dsa-cert type -1<br>
  debug1: key_load_public: No such file or directory<br>
  debug1: identity file /root/.ssh/id_ecdsa type -1<br>
  debug1: key_load_public: No such file or directory<br>
  debug1: identity file /root/.ssh/id_ecdsa-cert type -1<br>
  debug1: key_load_public: No such file or directory<br>
  debug1: identity file /root/.ssh/id_ed25519 type -1<br>
  debug1: key_load_public: No such file or directory<br>
  debug1: identity file /root/.ssh/id_ed25519-cert type -1<br>
  debug1: Enabling compatibility mode for protocol 2.0<br>
  debug1: Local version string SSH-2.0-OpenSSH_7.4<br>
  debug1: Remote protocol version 2.0, remote software version babeld-9db747ba<br>
  debug1: no match: babeld-9db747ba<br>
  debug1: Authenticating to github.com:22 as 'git'<br>
  debug1: SSH2_MSG_KEXINIT sent<br>
  debug1: SSH2_MSG_KEXINIT received<br>
  debug1: kex: algorithm: curve25519-sha256@libssh.org<br>
  debug1: kex: host key algorithm: rsa-sha2-512<br>
  debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC:    compression: none<br>
  debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC:    compression: none<br>
  debug1: kex: curve25519-sha256@libssh.org need=64 dh_need=64<br>
  debug1: kex: curve25519-sha256@libssh.org need=64 dh_need=64<br>
  debug1: expecting SSH2_MSG_KEX_ECDH_REPLY<br>
  debug1: Server host key: ssh-rsa   SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8<br>
  debug1: Host 'github.com' is known and matches the RSA host key.<br>
  debug1: Found key in /root/.ssh/known_hosts:1<br>
  Warning: Permanently added the RSA host key for IP address   '192.30.253.112' to the list of known hosts.<br>
  debug1: rekey after 134217728 blocks<br>
  debug1: SSH2_MSG_NEWKEYS sent<br>
  debug1: expecting SSH2_MSG_NEWKEYS<br>
  debug1: SSH2_MSG_NEWKEYS received<br>
  debug1: rekey after 134217728 blocks<br>
  debug1: SSH2_MSG_EXT_INFO received<br>
  debug1: kex_input_ext_info: server-sig-algs=<br>
  debug1: SSH2_MSG_SERVICE_ACCEPT received<br>
  debug1: Authentications that can continue: publickey<br>
  debug1: Next authentication method: publickey<br>
  debug1: Trying private key: /root/.ssh/id_rsa
  debug1: Trying private key: /root/.ssh/id_dsa<br>
  debug1: Trying private key: /root/.ssh/id_ecdsa<br>
  debug1: Trying private key: /root/.ssh/id_ed25519<br>
  debug1: No more authentication methods to try.<br>
  Permission denied (publickey).  </p>
  
  <p>Please help to resolve it.</p>