If you have experienced the same error while accessing the Raspberry Pi terminal from Command Prompt, follow this article to learn how to fix it.
Fix Host Key Verification Failed Error on Raspberry Pi Remote Access
Most people use the simple approach to access the Raspberry Pi terminal remotely on Command Prompt using the following command:
Though they manage to access the terminal for the first time without an error, however, for the second time, they may encounter the “Host key verification failed” error, which is shown below:
This error prevents Raspberry Pi users from logging in the system through Command Prompt and to fix this error, you must follow the below-given steps:
Step 1: Go to the “C:\Users” folder location on Windows PC or laptop.
Step 2: Select the user you are currently logged in to. In my case, it’s awaix. You can confirm your user here.
Step 3: Go to the “.ssh” folder.
Note: If you cannot see the “.ssh” folder, go to the “Hidden items” box through the “View” tab.
Step 4: Remove or rename the “known_hosts” file.
Once done, go to Command Prompt and enter the following command again:
Click “yes” to confirm adding the host.
Enter the Raspberry Pi password to access the terminal remotely.
Conclusion
The above guideline is useful to fix the host key verification failed error while accessing the Raspberry Pi terminal on Command Prompt. The users just have to delete or rename the “host” file inside the “.ssh” folder to successfully log in to Raspberry Pi using the SSH connection with username and password.