Subject: Re: bug#20246: 25.0.50; Tramp does not show correct error message when ssh refuses to connect to host due to changed host key

From: Michael Albinus <[email-masked]>
Date: Fri, 03 Apr 2015 12:05:19 +0200

Filipp Gunbin <[email-masked]> writes:

> When I try to connect to a host and that host's key differs from what I
> have in ~/.ssh/known_hosts Tramp does not handle that correctly.
>
> SSH suspects an attack, but in my case it is not.
>
> I suppose Tramp could show the full error message emitted by ssh.
>
> 16:58:00.853511 tramp-process-actions (6) #
> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
> @    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
> SHA256:<fingerprint>.
> Please contact your system administrator.
> Add correct host key in /Users/fgunbin/.ssh/known_hosts to get rid of this message.
> Offending ECDSA key in /Users/fgunbin/.ssh/known_hosts:67
> ECDSA host key for <myhost> has changed and you have requested strict checking.
> Host key verification failed.
> 16:58:00.853619 tramp-process-sentinel (5) # Sentinel called: `#<process *tramp/ssh fgunbin@<myhost>*>' `exited abnormally with code 255
> '

Usually, Tramp shows the connection buffer in this error case,
containing all these messages. Doesn't it happen for you?

It shows this buffer for 30 seconds, or until you hit a key.

> Filipp

Best regards, Michael.