Discussion:
tramp hanging
(too old to reply)
jls
2013-03-06 19:53:47 UTC
Permalink
I am trying to connect from a Mac to a remote host running Ubuntu via
tramp. I get a request for a password, but when I enter that, the system
sits there and does not go any further.

I have TextWrangler on the Mac, and it can connect using sftp, so I
tried using that: /sftp:***@host: Sam result: password entered and
nothing happens.

Any suggestions?
Michael Albinus
2013-03-06 21:12:49 UTC
Permalink
Post by jls
I am trying to connect from a Mac to a remote host running Ubuntu via
tramp. I get a request for a password, but when I enter that, the
system sits there and does not go any further.
I have TextWrangler on the Mac, and it can connect using sftp, so I
nothing happens.
Any suggestions?
There is a connection buffer *tramp/ ...* which might give you a hint.

Otherwise, apply (setq tramp-verbose 6) before running the test, and
show the debug buffer *debug tramp/ ...*. This could tell us more.

Best regards, Michael.
jls
2013-03-08 00:33:27 UTC
Permalink
Post by Michael Albinus
Post by jls
I am trying to connect from a Mac to a remote host running Ubuntu via
tramp. I get a request for a password, but when I enter that, the
system sits there and does not go any further.
I have TextWrangler on the Mac, and it can connect using sftp, so I
nothing happens.
Any suggestions?
There is a connection buffer *tramp/ ...* which might give you a hint.
Otherwise, apply (setq tramp-verbose 6) before running the test, and
show the debug buffer *debug tramp/ ...*. This could tell us more.
Best regards, Michael.
The *tramp buffer did not seem to have anything useful in it. Here is
the contents of the debug buffer:

Tramp debug buffer:
;; GNU Emacs: 24.2.1 Tramp: 2.2.3-24.1 -*- mode: outline; -*-
08:12:15.021504 tramp-maybe-open-connection (3) # Opening connection for
***@gs6141-atlas using sftp...
08:12:15.026389 tramp-maybe-open-connection (6) # /bin/sh -i
08:12:15.127768 tramp-wait-for-regexp (6) #
#$
08:12:15.128373 tramp-maybe-open-connection (3) # Sending command `exec
ssh -l jack -e none gs6141-atlas'
08:12:15.128519 tramp-send-command (6) # exec ssh -l jack -e none
gs6141-atlas
08:12:15.128968 tramp-process-actions (3) # Waiting for prompts from
remote shell
08:12:15.430017 tramp-process-one-action (5) # Looking for regexp
"\(.*ogin\( .*\)?: *\)\'" from remote shell
08:12:15.432104 tramp-process-one-action (5) # Looking for regexp
"\(^.*\([pP]assword\|[pP]assphrase\).*:^@? *\)\'" from remote shell
08:12:15.432297 tramp-process-one-action (5) # Call `tramp-action-password'
08:12:15.432460 tramp-action-password (3) # Sending password
08:12:19.589173 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
08:12:19.589394 tramp-process-one-action (5) # Looking for regexp "\(^[^#$%>
]*[#$%>] *\)\'" from remote shell
08:12:19.589517 tramp-process-one-action (5) # Looking for regexp "\(\(?:^\|
\)[^#$%>
]*#?[#$%>] *\(\[[0-9;]*[a-zA-Z] *\)*\)\'" from remote shell
08:12:19.589635 tramp-process-one-action (5) # Looking for regexp
"\(\(Are you sure you want to continue connecting (yes/no)\?\)\s-*\)\'"
from remote shell
08:12:19.589748 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
08:12:19.589871 tramp-process-one-action (5) # Looking for regexp
"\(\(TERM = (.*)\|Terminal type\? \[.*\]\)\s-*\)\'" from remote shell
08:12:19.589988 tramp-process-one-action (5) # Looking for regexp
"\(\)\'" from remote shell
08:12:19.590099 tramp-process-one-action (5) # Call
`tramp-action-process-alive'
08:12:19.590489 tramp-process-one-action (5) # Looking for regexp
"\(.*ogin\( .*\)?: *\)\'" from remote shell
08:12:19.590600 tramp-process-one-action (5) # Looking for regexp
"\(^.*\([pP]assword\|[pP]assphrase\).*:

and several more repetitions until I ^C'd out of it.

Jack
Michael Albinus
2013-03-08 08:46:37 UTC
Permalink
jls <***@gmail.com> writes:

Hi Jack,
Post by jls
The *tramp buffer did not seem to have anything useful in it. Here is
08:12:15.128519 tramp-send-command (6) # exec ssh -l jack -e none
gs6141-atlas
08:12:15.128968 tramp-process-actions (3) # Waiting for prompts from
remote shell
Tramp does not recognize the remote prompt. Is it special?
What happens, if you apply in a shell (outside Emacs)

ssh -l jack -e none gs6141-atlas

Best regrads, Michael.
jls
2013-03-08 22:54:43 UTC
Permalink
Post by Michael Albinus
What happens, if you apply in a shell (outside Emacs)
ssh -l jack -e none gs6141-atlas
I get a password prompt and am able to connect w/o trouble.
Normally, I log into the machines using ssh -Y.
It may or may not be relevant that I log in through a VPN.

Jack
Post by Michael Albinus
Hi Jack,
Post by jls
The *tramp buffer did not seem to have anything useful in it. Here is
08:12:15.128519 tramp-send-command (6) # exec ssh -l jack -e none
gs6141-atlas
08:12:15.128968 tramp-process-actions (3) # Waiting for prompts from
remote shell
Tramp does not recognize the remote prompt. Is it special?
What happens, if you apply in a shell (outside Emacs)
ssh -l jack -e none gs6141-atlas
Best regrads, Michael.
Michael Albinus
2013-03-09 08:35:26 UTC
Permalink
Post by jls
Post by Michael Albinus
What happens, if you apply in a shell (outside Emacs)
ssh -l jack -e none gs6141-atlas
I get a password prompt and am able to connect w/o trouble.
I need to see the output. I suspect you have a prompt which is not
understood by Tramp.
Post by jls
Normally, I log into the machines using ssh -Y.
It may or may not be relevant that I log in through a VPN.
Likely, this doesn't matter.
Post by jls
Jack
Best regards, Michael.
jls
2013-03-09 22:01:56 UTC
Permalink
The problem was nonstandard prompts. On the Mac, the prompt is

Mac-bash:

On the servers, it is similar, with Mac replaced by the server name.
Michael's suggestion was to set the tramp shell prompt pattern:

(setq tramp-shell-prompt-pattern "^\\([#$]+\\|.+-bash:\\) *")

where the #$ was needed because tramp redefines the initial prompt to that.

Jack
Post by Michael Albinus
Post by jls
Post by Michael Albinus
What happens, if you apply in a shell (outside Emacs)
ssh -l jack -e none gs6141-atlas
I get a password prompt and am able to connect w/o trouble.
I need to see the output. I suspect you have a prompt which is not
understood by Tramp.
Post by jls
Normally, I log into the machines using ssh -Y.
It may or may not be relevant that I log in through a VPN.
Likely, this doesn't matter.
Post by jls
Jack
Best regards, Michael.
Continue reading on narkive:
Loading...