GNU bug report logs -
#20246
25.0.50; Tramp does not show correct error message when ssh refuses to connect to host due to changed host key
Previous Next
Reported by: Filipp Gunbin <fgunbin <at> fastmail.fm>
Date: Thu, 2 Apr 2015 14:11:01 UTC
Severity: normal
Tags: moreinfo
Found in version 25.0.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Filipp Gunbin <fgunbin <at> fastmail.fm> writes:
Hi Filipp,
> That's what I can reproduce now:
>
> - change host identity in ~/.ssh/known-host
> - M-x tramp-cleanup-all-connections
> - C-x 4 r /ssh:user <at> host:/file
>
> Now, Tramp shows correct error message from ssh.
OK.
> - now, quit it with C-]
> - again C-x 4 r (as above)
>
> Now Tramp shows in the echo area: "/ssh:user <at> host:/file does not exist"
>
> This is the behavior which takes place if the above steps are done
> rather quickly.
"rather quickly" means within 10 seconds. This is the default value of
`remote-file-name-inhibit-cache', the time Tramp keeps its cache for a
given file.
> If I take a pause before retrying to visit a file, ssh error message is
> shown correctly.
OK.
> Maybe this is not the same problem I had originally, but that's what
> I'm able to reproduce right now.
Could you, please, apply the following patch:
--8<---------------cut here---------------start------------->8---
*** /home/albinus/src/tramp/lisp/tramp.el.~master~ 2015-04-10 16:34:06.421074752 +0200
--- /home/albinus/src/tramp/lisp/tramp.el 2015-04-10 16:29:29.236143227 +0200
***************
*** 3558,3563 ****
--- 3558,3565 ----
(tramp-message vec 6 "\n%s" (buffer-string)))
(unless (eq exit 'ok)
(tramp-clear-passwd vec)
+ (tramp-flush-directory-property vec "")
+ (tramp-flush-connection-property proc)
(delete-process proc)
(tramp-error-with-buffer
(tramp-get-connection-buffer vec) vec 'file-error
--8<---------------cut here---------------end--------------->8---
This changes the behaviour that Tramp doesn't keep its cache anymore,
when there is an error during connection. Tramp reports that the
file/directory doesn't exist, and Emacs falls back to its default
behaviour, offering you a new empty buffer. This sounds consistent.
> Filipp
Best regards, Michael.
This bug report was last modified 3 years and 147 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.