Guide to Fixing Host Key Verification on Chromebook Secure Shell Extension
Guide to Fixing Host Key Verification on Chromebook Secure Shell Extension
Introduction
When trying to connect to a remote server on your Chromebook using SSH, you may encounter the "Host Key Verification Failed" error. This happens because your Chromebook stores a key for each server you’ve connected to before, and if that key doesn’t match the server’s current key, the connection is blocked for security reasons.
You’ll often see this error when:
- The server has changed its SSH key (for example, after a server update or reinstallation).
- The server’s IP address has been reassigned but the old key is still being used.
An example error message looks like this:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Offending RSA key in /home/user/.ssh/known_hosts:3
Host key verification failed.
The key lines you should focus on are:
- Offending RSA key in /home/user/.ssh/known_hosts:3 – This points to the line number (in this case, line 3) in the known_hosts file that contains the outdated or incorrect key.
- Host key verification failed – Confirms that the connection has been blocked due to the mismatch.
Now, here’s how to fix it:
1. Identify the Problem Key
Note the line number (in this case, line 3) from the error message, as you will need to remove that specific key.
2. Open the Secure Shell Extension Settings
- In the top-right corner of your Chromebook, click the Secure Shell icon.
- From the dropdown menu, select "Connection Dialog".
3. Access SSH Options
Within the Connection Dialog, click on Options to bring up further settings.
4. Open SSH Files
Select "SSH Files". This will open a view showing your SSH-related files, including the ~/.ssh/known_hosts file.
5. Edit the known_hosts File
- In the ~/.ssh/known_hosts window, scroll to the line number indicated in the error message (line 3 in this case).
- This file stores the keys for previously accepted servers. The offending key will be listed on the specified line.
6. Remove the Offending Key
- Delete the line with the mismatched or outdated key.
- Save the file.
7. Reconnect to the Server
Now, try connecting to the server again via the Secure Shell extension. You’ll be prompted to accept the server’s new key, and the connection should proceed without issues.
Image: Kiroe from Pixabay
Comments
Post a Comment