0

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?

Webdev Tory
  • 319
  • 1
  • 10
  • 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? – Michael Albinus Dec 15 '18 at 16:17
  • `Something is conflicting with the fact that I use similar emacs configs in both places` -- sorry, what places? – Croad Langshan Dec 15 '18 at 17:25
  • You could run strace on emacs to see how it `exec`s 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. – Croad Langshan Dec 15 '18 at 17:27
  • @MichaelAlbinus Both using Linux (SUSE Tumbleweed) – Webdev Tory 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. – Michael Albinus Dec 16 '18 at 10:07
  • After trying the tests above and locating the Tramp FAQ at https://www.gnu.org/software/tramp/#Frequently-Asked-Questions I was able to isolate that this has something to do with the .bashrc on the remote machine; when I disable that file, tramp connects just fine. When I'm back in my office I'll work out the details of which lines are causing me issues and update this post. – Webdev Tory Dec 16 '18 at 14:41

1 Answers1

0

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.

Webdev Tory
  • 319
  • 1
  • 10