I have been trying to get tramp working and I am having issues with recognizing the remote prompt. Unfortunately, I cannot change the remote prompt because it is dictated by my school.

I have tried changing the tramp-shell-prompt and tramp-terminal-prompt-regex variables to detect the prompt but I am not having success.

The remote response upon logging in is:

Last login: Tue Nov 13 17:59:43 2018 from ************
Disk quotas for user mdaly04 (uid *****):
     Filesystem   space   quota   limit   grace   files   quota   limit  grace
                   283M    900M   1024M           10500   90000    100k
                 26448K   1843M   2048M            3121    236k    263k

The last line is the shell prompt after login. The numbers in the prompt (such as 51 or 03) will change on each login. The storage information can change as well.

The regex I am trying to use is: (.{1,}\s){1,}.{1,}:
Checked with ... https://regex101.com/r/pW2dE4/67

Debug w/ verbose 10:

  • You appear to be using PCRE regexp syntax at regex101.com which isn't going to work. Furthermore it doesn't appear to even offer anything like Emacs syntax at all (BRE syntax would be a similar ballpark, but bizarrely it doesn't even provide that option), so basically don't use that site. Use M-x re-builder to test regexps in Emacs. See also emacs.stackexchange.com/q/5568/454 to prevent confusion.
    – phils
    Commented Aug 11, 2019 at 20:56

1 Answer 1


I would try the following setting:

(setq tramp-shell-prompt-pattern  "[-a-z0-9]+{[a-z0-9]+}[0-9]+: *")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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