1

When a Tramp session over SSH has been inactive for some time, it fails to wake up again and just hangs Emacs. How can I ensure that Tramp will either renew the connection, or time out before too long?

The hang is evident from the minibuffer message:

Decoding remote file ‘/ssh:foohost:/home/bignose/barfile.txt’ using ‘base64 -d -i >%s’

and an animated spinner, that spins endlessly for tens of minutes without result.

During this, Emacs is hung: it doesn't respond to any commands or keys, not even keyboard-quit (C-g).

This is Emacs version 25.2.

How can I convince Emacs that Tramp sessions should be re-established when they time out, instead of waiting forever?

0

Abort with C-g, then kill the tramp buffers :

Open the buffer list with C-x C-b, locate anything tramp and mark them for deletion (d) then execute (x) you can now use Tramp again.

  • “Abort with C-g […]” — as noted in the question, Emacs is unresponsive (including C-g) while it is waiting for the SSH command to run. – bignose Jul 17 '17 at 7:15
0

After the tramp-cleanup-all-connections command, you can just continue and a new session will be established on any further tramp action.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.