The authenticity of host can’t be established

I had similar issue, which means that the remote host is unknown /untrusted. The fix is to have the remote host entry in the known_hosts file.

This is what I have done:

  1. Generate (or use existing) RSA keys and store them in the <USER.HOME>/.ssh file. If you are using eclipse, you can generate RSA keys using Preferences;

    • General -> Network Connections -> SSH2 and then select the Key Management.
    • Now Click Generate RSA Key...
    • And then Save Private Key... in the .ssh folder
  2. Now your <USER.HOME>/.ssh would contain file; private key, public key and known_hosts

  3. share your public key with your trusted hosts.
  4. Open Git Bash Promp (command prompt) and enter below command.
    • ssh -vt <user>@<hostname>
    • For Example: ssh -vt git@mygithub.com
  5. When it prompts error … Are you sure you want to continue connecting (yes/no)?
  6. Say ‘yes’
  7. Now your remote host is added to the known_hosts
  8. Done.

Now if you try pushing the file to remote, you don’t see any errors.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)