unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: lyallp <Lyall.Pearce@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Help with Emacs 22.2.1 using TRAMP and PuTTY/plink
Date: Wed, 30 Apr 2008 23:35:54 -0700 (PDT)	[thread overview]
Message-ID: <c48808cd-8999-465e-bfa8-0841c80804b8@r9g2000prd.googlegroups.com> (raw)

Emacs version 22.2.1 (i386-mingw-nt5.1.2600) of 2008-03-27 on RELEASE

running on Windows XP
Connecting to a Solaris Unix host using PuTTY 0.60 plink with a pagent
running with suitable keys loaded.

I have updated windows PATH to include the PuTTY install directory so
Tramp can find it.

plink, by itself will quite happily connect.

I connect, but then it does not find the command line prompt unless I
change 'Tramp rsh end of line' in Customize->Files->Tramp to '\r'

The problem with this is that tramp puts a \r on the end of every
input line, which is not what I want.

Then, when tramp tries to execute
  exec env 'ENV=' 'PROMPT_COMMAND=' 'PS1=$ ' /bin/sh
it tacks a \n on the end, which is interpreted as a character in the /
bin/sh filename, which makes the program /bin/sh<newline> not found,
causing termination of the shell and subsequent termination of plink
and finally process 'exit' within emacs.

If I don't set the  'Tramp rsh end of line', then tramp does not find
the initial login prompt, which is returned (albeit a rather long one
as I update my window title via the prompt string)

I also tried setting it to '\n'

I have tweaked the debug output to show the process info...

Debug output is as follows (with control chars replaced by thier
visible equivilents):-

# Opening connection for user_name@the_host using nil...
# plink the_host -l user_name -ssh
# Waiting for prompts from remote shell
# Waiting 60s for prompt from remote shell
# Looking for regexp "^.*\([pP]assword\|passphrase\).*:^@? *" from
remote shell
# Looking for regexp ".*ogin\( .*\)?: *" from remote shell
# Looking for regexp "^[^#$%>
]*[#$%>] *" from remote shell
# Looking for regexp "^[^#$%>
]*[#$%>] *\(^[\[[0-9;]*[a-zA-Z] *\)*" from remote shell
# Looking for regexp "^.*\(Connection \(?:\(?:clo\|refu\)sed\)\|Host
key verification failed\.\|Login \(?:[Ii]ncorrect\)\|Name or service
not known\|\(?:Permission denied\|Sorry, try again\)\.\).*\|^.*\
(Received signal [0-9]+\).*" from remote shell
# Looking for regexp "\(Are you sure you want to continue connecting
(yes/no)\?\)\s-*" from remote shell
# Looking for regexp "\(\(?:Store key in cache\? (y/\|Update cached key
\? (y/n, Return cancels connectio\)n)\)\s-*" from remote shell
# Looking for regexp "\(TERM = (.*)\|Terminal type\? \[.*\]\)\s-*"
from remote shell
# Looking for regexp "" from remote shell
# Looking for regexp "^.*\([pP]assword\|passphrase\).*:^@? *" from
remote shell
# Looking for regexp ".*ogin\( .*\)?: *" from remote shell
# Looking for regexp "^[^#$%>
]*[#$%>] *" from remote shell
# Found remote shell prompt.
# Initializing remote shell
# Sending command to remote shell: unset HISTORY
$ unset HISTORY
# Process *tramp/plink user_name@the_host*
unset HISTORY\r
>^H^[]2 the_host - user_name - /home/user_name\auser_name@the_host:>^H~^M
$
>^H^[]2 the_host - user_name - /home/user_name\auser_name@the_host:>^H~^M
$
# Sending command to remote shell: unset correct
$ unset correct
# Process *tramp/plink user_name@the_host*
unset correct\r
>^H^[]2 the_host - user_name - /home/user_name\auser_name@the_host:>^H~^M
$
>^H^[]2 the_host - user_name - /home/user_name\auser_name@the_host:>^H~^M
$
# Sending command to remote shell: unset autocorrect
$ unset autocorrect
# Process *tramp/plink user_name@the_host*
unset autocorrect\r
>^H^[]2 the_host - user_name - /home/user_name\auser_name@the_host:>^H~^M
$
>^H^[]2 the_host - user_name - /home/user_name\auser_name@the_host:>^H~^M
$ $ exec env 'ENV=' 'PROMPT_COMMAND=' 'PS1=$ ' /bin/sh #
# Waiting 30s for remote `/bin/sh' to come up...
# Process nil
exec env 'ENV=' 'PROMPT_COMMAND=' 'PS1=$ ' /bin/sh #\r
$ $ [[Regexp `\(^[^#$%>
]*[#$%>] *\|^[^#$%>
]*[#$%>] *\(^[\[[0-9;]*[a-zA-Z] *\)*\)\'' not found in 30 secs]]


Any assistance would be greatly appreciated.

...Lyall


             reply	other threads:[~2008-05-01  6:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-01  6:35 lyallp [this message]
2008-05-04 11:23 ` Help with Emacs 22.2.1 using TRAMP and PuTTY/plink Michael Albinus
     [not found] ` <mailman.11172.1209900210.18990.help-gnu-emacs@gnu.org>
2008-05-04 11:57   ` lyallp
2008-05-04 21:40     ` Michael Albinus
     [not found]     ` <mailman.11182.1209937216.18990.help-gnu-emacs@gnu.org>
2008-05-05  8:19       ` Livin Stephen
2008-05-05  9:33         ` lyallp
2008-05-06  0:05           ` lyallp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c48808cd-8999-465e-bfa8-0841c80804b8@r9g2000prd.googlegroups.com \
    --to=lyall.pearce@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).