From the commandline, this works:

ssh office

However, C-x C-f /ssh:office: simply freezes and eventually times out. That C-x C-f syntax works fine for all the servers our sysadmin has configured, which makes me think that one of two things is the issue:

1) Something is conflicting with the fact that I use similar emacs configs in both places (remote office machine and the laptop I'm trying to access it with)

2) Tramp requires some different treatment (ports?) than does plain CLI ssh

I tried (setq tramp-verbose 10) but when I have the timeout, my tramp error buffer is empty. Any ideas?

  • Don't know whether this is a valid sx question; it sounds like a bug report rather. However, what are the local and remote machines operating systems? Dec 15 '18 at 16:17
  • Something is conflicting with the fact that I use similar emacs configs in both places -- sorry, what places? Dec 15 '18 at 17:25
  • You could run strace on emacs to see how it execs ssh (i.e. what exact command line it uses)? It may be that when you then run that exact command from the command line, it will hang there too, and you can experiment to find out why. Dec 15 '18 at 17:27
  • @MichaelAlbinus Both using Linux (SUSE Tumbleweed) Dec 15 '18 at 23:32
  • In this case, please start emacs -Q, apply (setq tramp-verbose 10), and try to connect. If it still doesn't work, write a Tramp bug report, appending the Tramp debug buffer. Dec 16 '18 at 10:07

The solution was as with this answer: https://emacs.stackexchange.com/a/38568/17004

Tramp will choke if the remote .bashrc includes a modification to $PS1. In my case, my remote machine had this:

export PS1="<\u@\H> \W/ \A$ "

Removing it allowed tramp to access the machine fine. If anyone knows the secret to making lines load only when not read by TRAMP, please feel free to put it in a comment.

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.