How to accept new host key?

6,157 views
Skip to first unread message

Chris Shelton

unread,
Mar 1, 2013, 7:57:15 PM3/1/13
to chromiu...@chromium.org
I recently updated my main ssh server, and changed the ssh host keys but kept the same host name.  On my other systems, manually editing the ~/.ssh/known_hosts file is easy.

But on my chromebook, it is tricky to know where and how to edit the known_hosts file. 

Is there something in the secure shell extension that would allow me to accept the new host key?

My connection attempt reports the following from the Secure shell plugin:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
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
c0:f5:4f:44:97:7b:9d:57:43:b0:83:16:cd:9a:7b:32.
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:1
ECDSA host key for [myhost.dept.indiana.edu]:22 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?

(I've altered my actual hostname.)

Thanks for any suggestions or advice.  I've been very happy with Secure Shell, especially on the chromebook.

chris



Robert Ginda

unread,
Mar 1, 2013, 7:58:15 PM3/1/13
to Chris Shelton, chromium-hterm
See this entry in the FAQ: http://git.chromium.org/gitweb/?p=chromiumos/platform/assets.git;a=blob;f=chromeapps/hterm/doc/faq.txt#l448

Sorry it's a little convoluted at the moment :/

Chris Shelton

unread,
Mar 1, 2013, 8:12:42 PM3/1/13
to Robert Ginda, chromium-hterm
Thanks for pointing me in the right direction.  The first option to specify a host key to remove gave me a slightly odd error, but I used the second one:
term_.command.removeAllKnownHosts()
and that worked great!  And since I only have 2 systems that I regular ssh into, this isn't a big issue.

I appreciate the super fast response, and the regular updates to Secure Shell.

chris

Robert Ginda

unread,
Mar 1, 2013, 8:14:23 PM3/1/13
to Chris Shelton, chromium-hterm
What was the slightly odd error?

Chris Shelton

unread,
Mar 1, 2013, 8:24:26 PM3/1/13
to Robert Ginda, chromium-hterm
Robert,

I'm not sure if I put the index part in correctly, but here is what I saw:

term_.command.removeKnownHostByIndex(1)
undefined
Uncaught TypeError: undefined is not a function lib_hterm_deps.concat.js:1614

Hopefully that tells you more than it does to me.  This was the first system that I entered to connect to using Secure Shell.

chris

Robert Ginda

unread,
Mar 1, 2013, 8:29:40 PM3/1/13
to Chris Shelton, chromium-hterm
Ah, thanks.

FWIW, the delete probably worked.  Redisplaying the connection dialog seems to have encountered some trouble.

N

unread,
Mar 2, 2013, 8:10:53 AM3/2/13
to chromiu...@chromium.org, Chris Shelton
Deleting a single key works, even though it shows an error. Happens to me every time.

prit...@gmail.com

unread,
Jun 24, 2013, 5:34:36 PM6/24/13
to chromiu...@chromium.org, Chris Shelton
Sorry, for the naive question. But, I am not sure where to execute the javascript command: 
term_.command.removeAllKnownHosts()

I have chrome installed on a windows machine. 

Robert Ginda

unread,
Jun 24, 2013, 5:44:31 PM6/24/13
to prit...@gmail.com, chromium-hterm, Chris Shelton
Press Ctrl-Shift-J in the Secure Shell window to bring up the JavaScript console.

ghu...@gmail.com

unread,
Oct 24, 2013, 6:56:04 PM10/24/13
to chromiu...@chromium.org, prit...@gmail.com, Chris Shelton
I've been having this same problem (and let me echo my satisfaction with the app otherwise). While this solution works, it seems that I have to do it each time I log into my shell account at my ISP.

Is there any way to make this problem go away entirely?

All best, and thanks again for the software,
George

Robert Ginda

unread,
Oct 24, 2013, 7:00:13 PM10/24/13
to ghu...@gmail.com, chromium-hterm, Pritam Dey, Chris Shelton
Every time you log into your shell account the host key changes?  Sounds like something is funky with the shell account.

I believe there is an ssh option to skip the host key check, but I don't know it off the top of my head.  It also largely defeats the purpose of ssh, as you'll never really know if your connecting to the right place.




--
You received this message because you are subscribed to the Google Groups "chromium-hterm" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-hterm/bab857ea-07bf-490e-a35c-cb427fdad3a8%40chromium.org.

George Hunka

unread,
Oct 24, 2013, 7:04:58 PM10/24/13
to Robert Ginda, ghu...@gmail.com, chromium-hterm, Pritam Dey, Chris Shelton
Thanks, Robert. I'll contact my ISP's support desk and see if it can be
defunked on their end.

All best,
George




On Thu, October 24, 2013 7:00 pm, Robert Ginda wrote:
> Every time you log into your shell account the host key changes? Sounds
> like something is funky with the shell account.
>
> I believe there is an ssh option to skip the host key check, but I don't
> know it off the top of my head. It also largely defeats the purpose of
> ssh, as you'll never really know if your connecting to the right place.
>
>
>
>
> On Thu, Oct 24, 2013 at 3:56 PM, <ghu...@gmail.com> wrote:
>
>> I've been having this same problem (and let me echo my satisfaction with
>> the app otherwise). While this solution works, it seems that I have to
>> do
>> it each time I log into my shell account at my ISP.
>>
>> Is there any way to make this problem go away entirely?
>>
>> All best, and thanks again for the software,
>> George
>>
>>
>> On Monday, June 24, 2013 5:44:31 PM UTC-4, Robert Ginda wrote:
>>
>>> Press Ctrl-Shift-J in the Secure Shell window to bring up the
>>> JavaScript
>>> console.
>>>
>>>
>>> On Mon, Jun 24, 2013 at 2:34 PM, <prit...@gmail.com> wrote:
>>>
>>>> Sorry, for the naive question. But, I am not sure where to execute the
>>>> javascript command:
>>>> term_.command.**removeAllKnownHo**sts()
>>>>
>>>> I have chrome installed on a windows machine.
>>>>
>>>> On Friday, March 1, 2013 4:58:15 PM UTC-8, Robert Ginda wrote:
>>>>
>>>>> See this entry in the FAQ: http://git.chromium.org/**gitweb**
>>>>> /?p=chromiumos/platform/**assets**.git;a=blob;f=**chromeapps/**
>>>>> hterm/doc/faq.txt#**l448<http://git.chromium.org/gitweb/?p=chromiumos/platform/assets.git;a=blob;f=chromeapps/hterm/doc/faq.txt#l448>
>>>>>
>>>>> Sorry it's a little convoluted at the moment :/
>>>>>
>>>>>
>>>>> On Fri, Mar 1, 2013 at 4:57 PM, Chris Shelton <
>>>>> cshe...@shelton-family.net> wrote:
>>>>>
>>>>>> I recently updated my main ssh server, and changed the ssh host keys
>>>>>> but kept the same host name. On my other systems, manually editing
>>>>>> the
>>>>>> ~/.ssh/known_hosts file is easy.
>>>>>>
>>>>>> But on my chromebook, it is tricky to know where and how to edit the
>>>>>> known_hosts file.
>>>>>>
>>>>>> Is there something in the secure shell extension that would allow me
>>>>>> to accept the new host key?
>>>>>>
>>>>>> My connection attempt reports the following from the Secure shell
>>>>>> plugin:
>>>>>> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@****@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
>>>>>> @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
>>>>>> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@****@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
>>>>>> IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
>>>>>> 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
>>>>>> c0:f5:4f:44:97:7b:9d:57:43:b0:****83:16:cd:9a:7b:32.

wangt...@gmail.com

unread,
Apr 8, 2015, 11:53:36 AM4/8/15
to chromiu...@chromium.org
Press Ctrl-Shift-J
term_.command.removeAllKnownHosts()


在 2013年3月2日星期六 UTC+8上午8:57:15,Chris Shelton写道:

brad....@gmail.com

unread,
Jul 18, 2015, 5:26:52 PM7/18/15
to chromiu...@chromium.org, wangt...@gmail.com
What does ctrl-shift-j have to do with deleting host keys? Can't see anything in there that helps.

Karl Grose

unread,
Jul 18, 2015, 7:43:59 PM7/18/15
to chromiu...@chromium.org, wangt...@gmail.com, brad....@gmail.com
On Saturday, July 18, 2015 at 2:26:52 PM UTC-7, brad....@gmail.com wrote:

What does ctrl-shift-j have to do with deleting host keys? Can't see anything in there that helps.

On Wednesday, April 8, 2015 at 11:53:36 AM UTC-4, wangt...@gmail.com wrote:
Press Ctrl-Shift-J
term_.command.removeAllKnownHosts()

Enter the command from the previous post into the console to remove all hosts:

ctrl-shift-j, then enter: term_...


under the FAQ:

"How do I remove a known host fingerprint (aka known_hosts) entry?"

--Karl
 

saqib...@seagate.com

unread,
Aug 27, 2016, 11:39:24 AM8/27/16
to chromium-hterm, wangt...@gmail.com, brad....@gmail.com
I am try this, but it is throwing an error:

term_.command.removeAllKnownHosts();
VM268:1 Uncaught ReferenceError: term_ is not defined
at :1:1(anonymous function) @ VM268:1
Reply all
Reply to author
Forward
0 new messages