Using Emacs-25.2.1 on Windows XP (and on 7, too) I can connect to my Raspberry Pi (Rasppian OS) using TRAMP and the plink method and it works flawlessly. But when I try to connect to my Mac mini (OSX 10.7.4), after I input the password it hangs on with the "Found remote shell prompt..." message. The shell on OSX is plain old bash with no fancy configuration in ~/.bash_profile and the sshd is the default one at /usr/sbin

If I try to connect directly from the CMD or MSYS shell to the OSX e.g.

$ plink macmini@lionserver.home

It connects flawlessly. Any help is appreciated. Thanks.

Parts of debug tramp/ssh related to locale from the Linux connection:

12:40:09.589843 tramp-send-command (6) # locale -a

12:40:09.655846 tramp-wait-for-regexp (6) #










12:40:09.709849 tramp-open-connection-setup-interactive-shell (5) # Setting coding system to ‘utf-8’ and ‘utf-8-unix’

Parts of debug tramp/ssh related to locale from the OSX connection:

12:33:56.549506 tramp-send-command (6) # locale -a

12:33:56.655512 tramp-wait-for-regexp (6) #











12:33:56.709515 tramp-open-connection-setup-interactive-shell (5) # Setting coding system to utf-8-hfs and utf-8-hfs


Usually, this kind of problem is related to your remote shell prompt. Set tramp-verbose to 6 (or to 10, if it doesn't help), and rerun your test. If the Tramp traces don't tell you what's up, contact the Tramp tower via email, tramp-devel@gnu.org.

Edit: After investigation on the Tramp ML it has been shown, that this was a bug in Tramp. Will be fixed with the next Tramp 2.3.4 release.

  • Hello thank you for the reply. I've just added the trace-output buffer. Actually I had aleady looked into that but couldn't find any useful info in there, or does it actually contain useful info? So I've added the messages related to Tramp connection, too. – Terry Feb 5 '18 at 10:54
  • It's not really the Tramp traces I wanted to see. There must be a buffer *debug tramp/ssh macmini@g4.ev* which is relevant. – Michael Albinus Feb 5 '18 at 13:45
  • Thank you for the comment. I've copied that buffers output into this file: dropbox.com/s/cqr75lxf3e9rilf/TRAMP.txt?dl=0 – Terry Feb 5 '18 at 18:44
  • I still believe we shall trace it on the Tramp mailing list, what we're doing here exceeds the offer of stackeexchange. In short: your remote Mac does not offer a utf8 locale, see the output of locale -a. Likely, this is the problem. – Michael Albinus Feb 6 '18 at 7:18
  • Thank you for the comment. In the attached .txt file, I had removed the lines of locale output because they were too long. Now I edited the original post to include those lines. Btw, both Windows machines are using the turkish language as default. If it cannot be solved after this stage, I might as well post it to the Tramp mailing list. – Terry Feb 6 '18 at 10:29

Since Apple deprecated bash in favour of zsh, a message appears on login about ‘default interactive shell is now zsh’. This seems to mess with Tramp.

To disable it, add export BASH_SILENCE_DEPRECATION_WARNING=1 to your .bash_profile

  • Good comment. However this issue was solved and afterwards never popped up again – Terry Mar 20 '20 at 15:36

I had the exact same problem (connecting to Mac OS from Windows using plink hanged on Found remote shell prompt). After turning logging verbosity of tramp to 10 I was able to see that tramp was waiting to receive the response of a remote shell command. The response was in the log, but it was terminated by two repetitions of tramp-end-of-output variable which contains an MD5 session identifier. The regular expression in tramp-wait-for-output function was expecting only one session identifier to indicate the end of response, so it kept waiting.

I fixed it by changing the regexp

format "[^#$\n]*%s\r?$" (regexp-quote tramp-end-of-output)

in tramp-sh.el file to

format "[^#$\n]*\\(%s\\)+\r?$" (regexp-quote tramp-end-of-output)

to allow for multiple occurrences of tramp-end-of-output string.

After making the change, I needed to recompile the file by executing

emacs -Q --batch -f batch-byte-compile "<path_to_file>/tramp-sh.el"

Afterward, I was able to connect without problems.

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.