One of the things that is not implemented in the Secure Shell Chrome extension is the ability to remove know_host fingerprints which alert you if the fingerprint for a specific IP address has changed.

However there are times when you upgrade a systems and this need to be done.

Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
Please contact your system administrator.
Add correct host key in /.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /.ssh/known_hosts:7
ECDSA host key for has changed and you have requested strict checking.
Host key verification failed.
NaCl plugin exited with status code 255.
(R)econnect, (C)hoose another connection, or E(x)it?

Here is how to remove a known host fingerprint (from known_hosts) on a Chromebook.

You can find the index of the offending host entry reported by ssh if the connection fails (see above: “Offending ECDSA key in /.ssh/known_hosts:7”). Then you can open the JavaScript console (CTRL +Shift +J) and type the following into the console.

Replace INDEX with the number obviously.

To clear all the known hosts:

Leo Gaggl

ict business owner specialising in mobile learning systems. interests: sustainability, internet of things, ict for development, open innovation, agriculture

This Post Has 24 Comments

  1. Mitch Thompson

    Hi! I found your site while looking for a way to do what you did (delete an obsolete key). However, I don’t have the “removeKnownHostByIndex or .removeAllKnownHosts() on my ASUS. Do you know of an alternative method? Thanbks in advance!

  2. Michael Horne

    Thanks for this. It was driving me mad. :-)

  3. Chris

    I was able to just use a rm command in the shell to remove my known_hosts file all together.

    sudo rm /home/chronos/user/.ssh/known_hosts

    worked great for me.

  4. davidcartwright

    Many thanks, it worked!

    One suggestion is to highlight that this needs to be done while in the Secure Shell application.

  5. Leo Gaggl

    That would mean you are in developer mode. This would not probably work for the average user that only has normal access. But I am not sure on that. Let me know if different.


  6. Michael

    You really helped me out. Thank you! How the heck should I find out myself without finding this blog? Any source to begin how I should known this (secret??) information???

  7. Saqib Ali

    I am try this, but it is throwing an error:
    VM268:1 Uncaught ReferenceError: term_ is not defined
    at :1:1(anonymous function) @ VM268:1

  8. Leo Gaggl

    Most likely you’re not launching the JS console from within the terminal window but another Chrome tab.

  9. Darrell

    Nope, doesn’t work even when launching the JS console from within the terminal window. Will keep searching … gotta be a way. Otherwise, re-imaging a VPS will always lock you out on a Chromebook.

  10. Leo Gaggl

    Not sure why this is not working for you. I do this reasonably frequently (for the same reason – VPS change).

  11. Matthew T

    Thank you thank you thank you! This worked like a charm for me. I was going batty trying to otherwise edit the .ssh/known_hosts file. As Leo Gaggl said though to Saqib Ali, CTRL + SHIFT + j needs to be done from within the offending ssh tab (apparently) and not from crosh or other tab. (I’m on a 2015 Pixel FWIW)

  12. Bernard

    Still having the problem.

    VM43:1 Uncaught ReferenceError: term_ is not defined
    at :1:1
    (anonymous) @ VM43:1

  13. Bernard

    Solved it, need to run the “CTRL + SHIFT + j” command in the terminal for the terminal.

  14. Carlos

    Leo, thanks for this post. I just reimaged an ubuntu server and i could not log in locally from the chromebook. Your answer in the comment to open the javascript console from the secure shell tab is gold!

    Keep up the good work of information

  15. Lance

    Thanks!!!! Rare nonintuative answer to a frustrating problem.

  16. kalyana c kaza

    thanks much dude!

  17. Lotus49

    Thank you. That worked perfectly.

    It’s an obscure thing to have to do but it was easy and effective.

  18. Wobbly Giraffe

    Worked great thanks for guide, was stuck on this poking around in the developer console and shell.

  19. adamjimenez

    Easier way:
    Ctrl – right click then Clear SSH known_hosts

  20. Repeating what Adam says. With the latest updates to the plugin the term command doesn’t do this anymore. Just ctrl-click on the terminal window and choose the clear hosts item.

  21. Pingback: rob

  22. Scott

    @ adamjimenez, OMG i was going mad trying to get the terminal to open within “the tab” only the side window terminal would open. Life saver, thank you

  23. Strahil Nikolov

    Once I opened the console as described above, and executed the ‘term_’ command – I got an error similar to :
    VM43:1 Uncaught ReferenceError: term_ is not defined
    at :1:1
    (anonymous) @ VM43:1”

    And then I saw the following:
    “Did you know that there is a dedicated options page?
    No need to modify ‘term_’ directly anymore.

    Clicking on the link and then going to ‘SSH Files’ , I was able to modify my known_hosts . Don’t forget to ‘Save’ your changes.

  24. muthii

    This doesn’t work consistently for most people just click Options -> SSH Files and update known_hosts and save.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.