14

I am running graphical Emacs 24.3.1 (this problem exists when using the console version as well) on Arch Linux. I am trying to use TRAMP to open files on a remote Fedora system by SSH with a private key which requires a password. Authentication works fine, and so does the listing of files. When I do try to open a file, my Emacs session hangs with "Tramp: Inserting `/{filename I'm trying to open}' ...done". It is not possible to abort with ESC ESC ESC or C-g. Does anyone have a solution to this?

justinpc
  • 797
  • 6
  • 19
  • 4
    The `tramp-verbose` variable should probably be your first port of call. – phils Jul 11 '13 at 08:22
  • Same problem here. It happens to me using ssh on tramp with password authentication (not using public key). – Diego Saa Jul 17 '13 at 11:03
  • You might want to read this: http://www.emacswiki.org/emacs/TrampMode#toc5 – Diego Saa Jul 17 '13 at 15:08
  • I wasn't able to find anything relating to my problem on the above emacswiki link, but I found a link somewhere saying that setting `tramp-verbose` to `5` could indeed solve the hangs. I tried it, and now I can indeed open files on the remote host. I then tried removing the `(setq tramp-verbose 5)` from my `.emacs` again so that I could tell you the message in the minibuffer when it hangs, but miraculously, I can still open files. – justinpc Jul 18 '13 at 09:16
  • And once again it's not opening new files. The message in my minibuffer now, just after trying to open a file is: `Tramp: Inserting \`filename'...done`. – justinpc Jul 18 '13 at 09:28

2 Answers2

15

Emacs 24 normally works very well with Tramp. What you might need is ControlMasterAuto in your .ssh/config file. This will ensure that the ssh connection information passes seamlessly to Emacs. This will also ensure that you only need to login once in a terminal and use multiple emacs frames in tramp mode. I have detailed the following steps

(1) Go to your .ssh/config file and add the following options

Host <hostname>
ControlMaster auto
ControlPath ~/.ssh/%r@%h:%p
ServerAliveCountMax=30
ServerAliveInterval=5

(2) Now login to the remote host through terminal.

(3) Open emacs frame and try opening the remote files through tramp (/ssh:). You must be able to connect to the remote host.

The above steps should work even for a two level authentication (using a rsa key +password).

rambalachandran
  • 2,091
  • 2
  • 19
  • 34
  • 1
    On opening a file with path `/ssh:host:path`, all works as advertised. Thanks for the tip. I would like to add that using `ssh -Nf host` allows you to keep your master connection open in the background, so that you don't accidentally close it. – justinpc Aug 20 '13 at 09:34
1

This thread is old - however, a very similar problem on my FC22 laptop (tramp hanging when trying to type a colon following /su in the minibuffer) appears to be fixed by commenting the ::1 line in /etc/hosts.

Alien Life Form
  • 1,884
  • 1
  • 19
  • 27