Solving known_host problem on a Chromebook

Last edited

Outdated key in .ssh/known_hosts on ChromeOS

When you set up a connection over ssh, the key of the remote host is stored in .ssh/known_hosts. When the ssh key of the host you want to connect to on a Chromebook with the stock ChromeOS is changed after the ssh client has stored the key, then the client closes the connection.

If you are running a stock ChromeOS you are without a shell. This means you can not use vi to remove the offending key from your known_host file.

However, you can use the Javascript console to solve this problem :)

Use the Javascript console to remove a line from the known_hosts file.

  • Open the ssh client
  • Right-click on the window
  • Choose the option to 'inspect the element'
  • In the new window. click on 'Console'
  • Enter the following line, replacing the number with the index number of the host to delete:


In the example above, the line to delete was line 4, Replace the 4 with the key you have to delete. This number is mentioned in the error-message.