Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask question.(5)

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

ITtutoria

ITtutoria Logo ITtutoria Logo

ITtutoria Navigation

  • Python
  • Java
  • Reactjs
  • JavaScript
  • R
  • PySpark
  • MYSQL
  • Pandas
  • QA
  • C++
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Python
  • Science
  • Java
  • JavaScript
  • Reactjs
  • Nodejs
  • Tools
  • QA
Home/ Questions/Steps to fix the error “ the authenticity of host can't be established”
Next
Answered
Ethan Bertrand
  • 31
Ethan Bertrand
Asked: May 12, 20222022-05-12T12:16:27+00:00 2022-05-12T12:16:27+00:00In: Programs

Steps to fix the error “ the authenticity of host can’t be established”

  • 31

. Advertisement .

..3..

. Advertisement .

..4..

I get the “the authenticity of host can’t be established” issue when trying to ssh to a machine. Here is the detail of the error I got the error message:

The authenticity of host '<host>' can't be established.
 ECDSA key fingerprint is SHA256:TER0dEslggzS/BROmiE/s70WqcYy6bk52fs+MLTIptM.
 Are you sure you want to continue connecting (yes/no)? yes
 Warning: Permanently added 'pc' (ECDSA) to the list of known hosts.

Please give me some advice to solve this problem.

the authenticity of host
  • 2 2 Answers
  • 157 Views
  • 0 Followers
  • 0
Answer
Share
  • Facebook
  • Report

2 Answers

  • Voted
  • Oldest
  • Recent
  • Random
  1. Best Answer
    dhtutoria Expert
    2022-06-02T10:55:56+00:00Added an answer on June 2, 2022 at 10:55 am

    The cause: I think this error occurs if you frequently edit keys, this warning will appear owing to security features; do not disable this feature. This warning only appeared once. If the problem persists after a second connection, the issue is most likely with writing to the known_hosts file. After that, you’ll receive the following message:

    Failed to add the host to the list of known hosts 

    The solution: To solve this problem you can change the file’s owner or make it writable by your user by fixing the file’s permissions.

    sudo chown -v $USER ~/.ssh/known_hosts
    • 14
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
  2. Chloë Dumont
    2022-05-25T19:51:47+00:00Added an answer on May 25, 2022 at 7:51 pm

    An old question that deserves a better response.

    Without disabling StrictHostKeyChecking, you can disable interactive prompt (which is insecure).

    The following logic can be incorporated into your script:

    if [ -z "$(ssh-keygen -F $IP)" ]; then
     ssh-keyscan -H $IP >> ~/.ssh/known_hosts
    fi

    It checks to see if the public key for the server is in known_hosts. It checks if the public key of the server is in known_hosts. If it is not, it requests it from the server and adds that to known_hosts.

    This means that you will be exposed to Man-In the-Middle attack once only.

    • Make sure that the script connects over a secure channel.
    • Inspecting logs and known_hosts to manually check fingerprints (to be done once only)
    • 22
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

Sidebar

Ask A Question
  • How to Split String by space in C++
  • How To Convert A Pandas DataFrame Column To A List
  • How to Replace Multiple Characters in A String in Python?
  • How To Remove Special Characters From String Python

Explore

  • Home
  • Tutorial

Footer

ITtutoria

ITtutoria

This website is user friendly and will facilitate transferring knowledge. It would be useful for a self-initiated learning process.

@ ITTutoria Co Ltd.

Tutorial

  • Home
  • Python
  • Science
  • Java
  • JavaScript
  • Reactjs
  • Nodejs
  • Tools
  • QA

Legal Stuff

  • About Us
  • Terms of Use
  • Privacy Policy
  • Contact Us

DMCA.com Protection Status

Help

  • Knowledge Base
  • Support

Follow

© 2022 Ittutoria. All Rights Reserved.

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.