0
votes

I am trying to connect to a remote serve through emacs tramp, everything works perfectly fine if I do it through the terminal but tramp keeps giving me the same error:

Tramp: Sending command ‘exec ssh -l user -p port -o ControlMaster=auto -o ControlPath='tramp.%C' -o ControlPersist=no -e none hostname’
Tramp: Waiting for prompts from remote shell...
Tramp: Sending password
Tramp: Waiting for prompts from remote shell...failed
Tramp: Opening connection for user@hostname#port using ssh...failed
tramp-file-name-handler: Timeout reached, see buffer ‘*tramp/ssh user@hostname*’ for details

I did try checking the mentioned buffer but its only speaking riddles to me:

[zplug] These repos have failed to load:
[01;31m- [31mmodules/terminal[00m
- [31mmodules/editor[00m
- [31mmodules/utility[00m
- [31mmodules/spectrum[00m
- [31mmodules/completion[00m
- [31mmodules/fasd[00m
[00m]0;(dali) ~
[1m[33msyj[39m[0m[38;5;242m@[1m[36mdali[39m[0m [1m[31m/home/user[39m[0m [32m[39m [36m[39m[37m[39m[33m[39m                                                            [34m[39m
[0m[27m[24m[J[1m[32m[39m[0m [K

If anyone could point me to some resources that help me decipher this or point me to what exactly is going wrong here I would be incredibly thankful!

EDIT:

Okay now I really struggle with figuring out what is going wrong here. The remote hosts shell prompt had a bit of a flashi formating and I fixed the corresponding bashrc according to yassinphilips comment (Emacs: Tramp doesn't work) however tramp will still not connect through emacs. When I type the tramp command into my terminal the connection doesn't work anymore, it did at some point though. If i connect via terminal doing ssh -p Port user@hostname I have no problem connecting.

The output of the debug buffer is the following

21:43:59.406221 tramp-get-file-property (8) #  file-truename nil
21:43:59.406327 tramp-flush-directory-property (8) # 
21:43:59.406447 tramp-get-connection-property (7) # process-name nil
21:43:59.406558 tramp-flush-connection-property (7) # [ssh syj 147.46.219.160#7919 nil nil] nil
21:43:59.406696 tramp-get-connection-property (7) # process-buffer nil
21:44:08.833748 tramp-get-connection-property (7) # ~ undef
21:44:08.833950 tramp-get-connection-property (7) # process-name nil
21:44:08.834070 tramp-get-connection-property (7) # process-name nil
21:44:08.834175 tramp-get-connection-property (7) # process-buffer nil
21:44:08.835576 tramp-maybe-open-connection (3) # Opening connection for [email protected]#7910 using ssh...
21:44:08.836280 tramp-get-connection-property (7) # login-args undef
21:44:08.836365 tramp-get-connection-property (7) # login-args undef
21:44:08.836446 tramp-get-connection-property (7) # process-name nil
21:44:08.836510 tramp-get-connection-property (7) # process-buffer nil
21:44:08.843233 tramp-set-connection-property (7) # vector [ssh syj 147.46.219.160#7910 amelie/ nil]
21:44:08.843407 tramp-maybe-open-connection (6) # /bin/sh -i
21:44:08.843484 tramp-get-connection-property (7) # vector [ssh syj 147.46.219.160#7910 amelie/ nil]
21:44:08.843571 tramp-get-connection-property (7) # check-remote-echo nil
21:44:08.843639 tramp-get-connection-property (7) # check-remote-echo nil
21:44:08.843766 tramp-get-connection-property (7) # gateway nil
21:44:08.847349 tramp-accept-process-output (10) # *tramp/ssh [email protected]* run *tramp/ssh [email protected]*
#$ 
21:44:08.847477 tramp-get-connection-property (7) # check-remote-echo nil
21:44:08.847558 tramp-get-connection-property (7) # check-remote-echo nil
21:44:08.847636 tramp-wait-for-regexp (6) # 
#$ 
21:44:08.847725 tramp-get-connection-property (7) # login-program undef
21:44:08.847799 tramp-get-connection-property (7) # login-args undef
21:44:08.847872 tramp-get-connection-property (7) # login-env undef
21:44:08.847936 tramp-get-connection-property (7) # async-args undef
21:44:08.847998 tramp-get-connection-property (7) # connection-timeout undef
21:44:08.848061 tramp-get-connection-property (7) # gw-args undef
21:44:08.848183 tramp-get-connection-property (7) # temp-file undef
21:44:08.848477 tramp-set-connection-property (7) # temp-file /var/folders/xn/pzns78lj6hd6qm2zgt96ph680000gp/T/tramp.369406KK
21:44:08.866100 tramp-maybe-open-connection (3) # Sending command ‘exec ssh -l syj -p 7910 -o ControlMaster=auto -o ControlPath='tramp.%C' -o ControlPersist=no -e none 147.46.219.160’
21:44:08.866275 tramp-get-connection-property (7) # process-name nil
21:44:08.866409 tramp-get-connection-property (7) # remote-echo nil
21:44:08.866516 tramp-send-command (6) # exec ssh -l syj -p 7910 -o ControlMaster=auto -o ControlPath='tramp.%C' -o ControlPersist=no -e none 147.46.219.160
21:44:08.866584 tramp-get-connection-property (7) # process-name nil
21:44:08.866649 tramp-get-connection-property (7) # chunksize nil
21:44:08.866713 tramp-set-connection-property (7) # last-cmd-time (22836 152 866694 0)
21:44:08.866783 tramp-send-string (10) # exec ssh -l syj -p 7910 -o ControlMaster=auto -o ControlPath='tramp.%C' -o ControlPersist=no -e none 147.46.219.160
21:44:08.866862 tramp-get-connection-property (7) # process-buffer nil
21:44:08.867009 tramp-set-connection-property (7) # first-password-request t
21:44:08.867691 tramp-process-actions (3) # Waiting for prompts from remote shell...
21:44:08.868230 tramp-get-connection-property (7) # gateway nil
21:44:09.042319 tramp-accept-process-output (10) # *tramp/ssh [email protected]* run *tramp/ssh [email protected]*
[email protected]'s password: 
21:44:09.042415 tramp-process-one-action (5) # Looking for regexp "\(.*\(user\|login\)\( .*\)?: *\)\'" from remote shell
21:44:09.042477 tramp-get-connection-property (7) # check-remote-echo nil
21:44:09.042535 tramp-get-connection-property (7) # check-remote-echo nil
21:44:09.042644 tramp-process-one-action (5) # Looking for regexp "\(^.*\(\(?:adgangskode\|contrase\(?:\(?:ny\|ñ\)a\)\|geslo\|h\(?:\(?:asł\|esl\)o\)\|iphasiwedi\|jelszó\|l\(?:ozinka\|ösenord\)\|m\(?:ot de passe\|ật khẩu\)\|pa\(?:rola\|s\(?:ahitza\|s\(?: phrase\|code\|ord\|phrase\|wor[dt]\)\|vorto\)\)\|s\(?:alasana\|enha\|laptažodis\)\|wachtwoord\|лозинка\|пароль\|ססמה\|كلمة السر\|गुप्तशब्द\|शब्दकूट\|গুপ্তশব্দ\|পাসওয়ার্ড\|ਪਾਸਵਰਡ\|પાસવર્ડ\|ପ୍ରବେଶ ସଙ୍କେତ\|கடவுச்சொல்\|సంకేతపదము\|ಗುಪ್ತಪದ\|അടയാളവാക്ക്\|රහස්පදය\|ពាក្យសម្ងាត់\|パスワード\|密[码碼]\|암호\)\).*:? *\)\'" from remote shell
21:44:09.042717 tramp-get-connection-property (7) # check-remote-echo nil
21:44:09.042769 tramp-get-connection-property (7) # check-remote-echo nil
21:44:09.042852 tramp-process-one-action (5) # Call ‘tramp-action-password’
21:44:09.042916 tramp-get-connection-property (7) # first-password-request nil
21:44:09.042981 tramp-get-connection-property (7) # check-remote-echo nil
21:44:09.043033 tramp-get-connection-property (7) # check-remote-echo nil
21:44:09.043617 tramp-action-password (3) # Sending password
21:44:09.043700 tramp-get-connection-property (7) # check-remote-echo nil
21:44:09.043757 tramp-get-connection-property (7) # check-remote-echo nil
21:44:09.043860 tramp-get-connection-property (7) # first-password-request t
21:44:11.774611 tramp-set-connection-property (7) # first-password-request nil
21:44:11.774843 tramp-process-one-action (5) # Looking for regexp "\(^.*\(Connection \(?:\(?:clo\|refu\)sed\)\|Host key verification failed\.\|Login \(?:[Ii]ncorrect\)\|N\(?:ame or service not known\|o supported authentication methods left to try!\)\|Permission denied\|\(?:Sorry, try again\|Timeout, server not responding\)\.\).*\|^.*\(Received signal [0-9]+\).*\)\'" from remote shell
21:44:11.774973 tramp-get-connection-property (7) # check-remote-echo nil
21:44:11.775075 tramp-get-connection-property (7) # check-remote-echo nil
21:44:11.775204 tramp-process-one-action (5) # Looking for regexp "\(^[^#$%>
]*[#$%>] *\)\'" from remote shell
21:44:11.775312 tramp-get-connection-property (7) # check-remote-echo nil
21:44:11.775406 tramp-get-connection-property (7) # check-remote-echo nil
21:44:11.775521 tramp-process-one-action (5) # Looking for regexp "\(\(?:^\|
\)[^]#$%>
]*#?[]#$%>] *\(\[[0-9;]*[a-zA-Z] *\)*\)\'" from remote shell
21:44:11.775629 tramp-get-connection-property (7) # check-remote-echo nil
21:44:11.775732 tramp-get-connection-property (7) # check-remote-echo nil
21:44:11.775842 tramp-process-one-action (5) # Looking for regexp "\(\(Are you sure you want to continue connecting (yes/no)\?\)\s-*\)\'" from remote shell
21:44:11.775945 tramp-get-connection-property (7) # check-remote-echo nil
21:44:11.776051 tramp-get-connection-property (7) # check-remote-echo nil
21:44:11.776160 tramp-process-one-action (5) # Looking for regexp "\(\(\(?:Store key in cache\? (y/\|Update cached key\? (y/n, Return cancels connectio\)n)\)\s-*\)\'" from remote shell
21:44:11.776262 tramp-get-connection-property (7) # check-remote-echo nil
21:44:11.776382 tramp-get-connection-property (7) # check-remote-echo nil
21:44:11.776494 tramp-process-one-action (5) # Looking for regexp "\(\(TERM = (.*)\|Terminal type\? \[.*\]\)\s-*\)\'" from remote shell
21:44:11.776597 tramp-get-connection-property (7) # check-remote-echo nil
21:44:11.776696 tramp-get-connection-property (7) # check-remote-echo nil
21:44:11.776801 tramp-process-one-action (5) # Looking for regexp "\(\)\'" from remote shell
21:44:11.776909 tramp-get-connection-property (7) # check-remote-echo nil
21:44:11.776972 tramp-get-connection-property (7) # check-remote-echo nil
21:44:11.777034 tramp-process-one-action (5) # Call ‘tramp-action-process-alive’
21:44:11.777101 tramp-get-connection-property (7) # gateway nil
21:44:11.777654 tramp-accept-process-output (10) # *tramp/ssh [email protected]* run *tramp/ssh [email protected]*

21:44:11.777758 tramp-process-one-action (5) # Looking for regexp "\(.*\(user\|login\)\( .*\)?: *\)\'" from remote shell
21:44:11.777833 tramp-get-connection-property (7) # check-remote-echo nil
21:44:11.777902 tramp-get-connection-property (7) # check-remote-echo nil
21:44:11.777993 tramp-process-one-action (5) # Looking for regexp "\(^.*\(\(?:adgangskode\|contrase\(?:\(?:ny\|ñ\)a\)\|geslo\|h\(?:\(?:asł\|esl\)o\)\|iphasiwedi\|jelszó\|l\(?:ozinka\|ösenord\)\|m\(?:ot de passe\|ật khẩu\)\|pa\(?:rola\|s\(?:ahitza\|s\(?: phrase\|code\|ord\|phrase\|wor[dt]\)\|vorto\)\)\|s\(?:alasana\|enha\|laptažodis\)\|wachtwoord\|лозинка\|пароль\|ססמה\|كلمة السر\|गुप्तशब्द\|शब्दकूट\|গুপ্তশব্দ\|পাসওয়ার্ড\|ਪਾਸਵਰਡ\|પાસવર્ડ\|ପ୍ରବେଶ ସଙ୍କେତ\|கடவுச்சொல்\|సంకేతపదము\|ಗುಪ್ತಪದ\|അടയാളവാക്ക്\|රහස්පදය\|ពាក្យសម្ងាត់\|パスワード\|密[码碼]\|암호\)\).*:? *\)\'" from remote shell
21:44:11.778085 tramp-get-connection-property (7) # check-remote-echo nil
21:44:11.778147 tramp-get-connection-property (7) # check-remote-echo nil
21:44:11.778244 tramp-process-one-action (5) # Looking for regexp "\(^.*\(Connection \(?:\(?:clo\|refu\)sed\)\|Host key verification failed\.\|Login \(?:[Ii]ncorrect\)\|N\(?:ame or service not known\|o supported authentication methods left to try!\)\|Permission denied\|\(?:Sorry, try again\|Timeout, server not responding\)\.\).*\|^.*\(Received signal [0-9]+\).*\)\'" from remote shell
21:44:11.778315 tramp-get-connection-property (7) # check-remote-echo nil
21:44:11.778379 tramp-get-connection-property (7) # check-remote-echo nil
21:44:11.778448 tramp-process-one-action (5) # Looking for regexp "\(^[^#$%>
]*[#$%>] *\)\'" from remote shell
21:44:11.778515 tramp-get-connection-property (7) # check-remote-echo nil
21:44:11.778577 tramp-get-connection-property (7) # check-remote-echo nil
21:44:11.778641 tramp-process-one-action (5) # Looking for regexp "\(\(?:^\|
\)[^]#$%>
]*#?[]#$%>] *\(\[[0-9;]*[a-zA-Z] *\)*\)\'" from remote shell
21:44:11.778707 tramp-get-connection-property (7) # check-remote-echo nil
21:44:11.778765 tramp-get-connection-property (7) # check-remote-echo nil
21:44:11.778851 tramp-process-one-action (5) # Looking for regexp "\(\(Are you sure you want to continue connecting (yes/no)\?\)\s-*\)\'" from remote shell
21:44:11.778923 tramp-get-connection-property (7) # check-remote-echo nil
21:44:11.778986 tramp-get-connection-property (7) # check-remote-echo nil
21:44:11.779052 tramp-process-one-action (5) # Looking for regexp "\(\(\(?:Store key in cache\? (y/\|Update cached key\? (y/n, Return cancels connectio\)n)\)\s-*\)\'" from remote shell
21:44:11.779117 tramp-get-connection-property (7) # check-remote-echo nil
21:44:11.779176 tramp-get-connection-property (7) # check-remote-echo nil
21:44:11.779243 tramp-process-one-action (5) # Looking for regexp "\(\(TERM = (.*)\|Terminal type\? \[.*\]\)\s-*\)\'" from remote shell
21:44:11.779323 tramp-get-connection-property (7) # check-remote-echo nil
21:44:11.779387 tramp-get-connection-property (7) # check-remote-echo nil
21:44:11.779449 tramp-process-one-action (5) # Looking for regexp "\(\)\'" from remote shell
21:44:11.779515 tramp-get-connection-property (7) # check-remote-echo nil
21:44:11.779573 tramp-get-connection-property (7) # check-remote-echo nil
21:44:11.779632 tramp-process-one-action (5) # Call ‘tramp-action-process-alive’
21:44:11.779699 tramp-get-connection-property (7) # gateway nil
21:44:11.935643 tramp-accept-process-output (10) # *tramp/ssh [email protected]* run *tramp/ssh [email protected]*
1

1 Answers

1
votes

The buffer shows you a lot of escape sequences, like [1m[33msyj[39m[0m[38;5;242m@[1m[36m. Try to get rid of them in your prompt; the Tramp manual explains some techniques.