1
I have been using Emacs+tramp+plink to edit files on remote Unix server since Emacs 22. Recently I upgraded my Emacs to 24, and found it no longer works any more ... it says it found remote shell prompt , but just stuck there.
Below is my tramp configuration,which worked perfectly in Emacs 23:
(require 'tramp)
(modify-coding-system-alist 'process "plink" 'utf-8-unix)
(setq tramp-default-method "plink"
tramp-completion-without-shell-p t)
(setq tramp-verbose 10)
(setq tramp-debug-buffer t)
I have a putty/plink profile "lab", which points to a remote Unix server. I open the file one the remote sever like this:
/plink:myaccount@lab:/home/myaccount/somefile.txt
From the tramp debug log, I can see tramp discovered the remote shell:
17:45:58.430000 tramp-get-connection-property (7) # check-remote-echo nil
17:45:58.430000 tramp-process-one-action (5) # Call `tramp-action-process-alive'
17:45:58.430000 tramp-accept-process-output (10) # *tramp/plink myaccount@lab* run
17:45:58.476000 tramp-accept-process-output (10) #
plink -l myaccount -ssh lab && exit || exit
Last login: Wed Aug 14 17:43:54 2013 from 192.168.0.1
Unauthorized access to this system is strictly prohibited.
[myaccount@unixhost ~]$
The problem is, it appears tramp then stuck in a infinite loop:
17:45:58.476000 tramp-get-connection-property (7) # process-buffer nil
17:45:58.492000 tramp-maybe-open-connection (3) # Found remote shell prompt on `lab'
17:45:58.492000 tramp-get-connection-property (7) # remote-shell nil
17:45:58.492000 tramp-open-shell (5) # Opening remote shell `/bin/sh'...
17:45:58.492000 tramp-get-connection-property (7) # process-name nil
17:45:58.492000 tramp-get-connection-property (7) # remote-echo nil
17:45:58.492000 tramp-send-command (6) # exec env ENV='' PROMPT_COMMAND='' PS1=\#\$\ PS2='' PS3='' /bin/sh
17:45:58.492000 tramp-get-connection-property (7) # process-name nil
17:45:58.492000 tramp-get-connection-property (7) # chunksize nil
17:45:58.492000 tramp-set-connection-property (7) # last-cmd-time (21003 17350 492000 0)
17:45:58.492000 tramp-send-string (10) # exec env ENV='' PROMPT_COMMAND='' PS1=\#\$\ PS2='' PS3='' /bin/sh
17:45:58.492000 tramp-get-connection-property (7) # process-buffer nil
17:45:58.492000 tramp-get-connection-property (7) # check-remote-echo nil
17:45:58.492000 tramp-get-connection-property (7) # check-remote-echo nil
17:45:58.492000 tramp-accept-process-output (10) # *tramp/plink lum@lab* run
17:45:58.539000 tramp-accept-process-output (10) # exec env ENV='' PROMPT_COMMAND='' PS1=\#\$\ PS2='' PS3='' /bin/sh
#$ #$
17:45:58.539000 tramp-get-connection-property (7) # check-remote-echo nil
17:45:58.539000 tramp-get-connection-property (7) # check-remote-echo nil
17:45:58.539000 tramp-accept-process-output (10) # *tramp/plink lum@lab* run
17:45:59.539000 tramp-accept-process-output (10) # exec env ENV='' PROMPT_COMMAND='' PS1=\#\$\ PS2='' PS3='' /bin/sh
#$ #$
This would take for ever, until I use ctrl-g to break it.
Don't know which part went wrong, again the exact same configuration works perfectly under Emacs 23 ...