Subject: Emacs, tramp, ssh, cygwin, and what is a pseudo-terminal?
From: "Jonadab the Unsightly One" <[email-masked]>
To: [email-masked]
Date: 10 Nov 2001 08:31:54 -0500
Newsgroups: gnu.emacs.help

[Posted and mailed.]
;;;   
;;;   
I'm trying to get tramp working.  Here is what I get after
each attempt:

 ,----------------------------------------------------
 | Pseudo-terminal will not be allocated because stdin is not a terminal.
 | The authenticity of host 'croplin (xxx.xxx.xxx.xx)' can't be established.
 | RSA key fingerprint is [a bunch of incomprehensible stuff].
 | Are you sure you want to continue connecting (yes/no)? 
 | Process *tramp/sm croplin* exited abnormally with code 255
 `----------------------------------------------------

But I think this may not be tramp's fault, because I went into eshell
and tried to ssh (to the same system) and got this:

 ,----------------------------------------------------
 | Welcome to the Emacs shell
 | 
 | d:/apps/emacs $ which ssh
 | y:/ssh.exe
 | d:/apps/emacs $ ssh croplin
 | Pseudo-terminal will not be allocated because stdin is not a terminal.
 | The authenticity of host 'croplin (xxx.xxx.xxx.xx)' can't be established.
 | RSA key fingerprint is [a bunch of incomprehensible stuff].
 | Are you sure you want to continue connecting (yes/no)? yes
 | 
 `----------------------------------------------------

At this point I can hit return as many times as I like, backspace back
and erase the yes, C-q RET, whatever, to no avail.  Whatever I do,
this buffer sits and does nothing forever unless I kill it, as if the
connection between things being typed in this buffer and input into
the ssh process is broken somehow.

The drive letter Y: is mapped to the cygwin bin directory
(D:/cygwin/bin/) from AUTOEXEC.BAT and so ssh here is the cygwin copy
of ssh.exe -- which works in other circumstances.  For example, At a
cygwin bash prompt, I can do this:

 ,----------------------------------------------------
 | root@RAPTOR1 ~
 | ssh croplin
 | root@croplin's password:
 | [root@croplin /root]# ls .emacs
 | .emacs
 `----------------------------------------------------

At a garden-variety command prompt, I can do this:

 ,----------------------------------------------------
 | C:\>y:ssh croplin
 | Could not create directory '//.ssh'.
 | The authenticity of host 'croplin (xxx.xxx.xxx.xx)' can't be established.
 | RSA key fingerprint is [a bunch of incomprehensible stuff].
 | Are you sure you want to continue connecting (yes/no)? yes
 | Failed to add the host to the list of known hosts (//.ssh/known_hosts2).
 | root@croplin's password:
 | [root@croplin /root]# ls .emacs
 | .emacs
 `----------------------------------------------------

It appears that the RSA problem (which is beyond my understanding of
ssh) and the need to say "yes" stem from being outside the cygwin
environment.  No problem, I'll just say "yes" every time -- right?
But it appears that within Emacs I can't do that; somehow the "yes"
isn't getting transmitted back or something.  And tramp doesn't seem
to provide for my being prompted for this, anyway (although if that
were the only issue I could probably fix it by altering tramp, though
I'd probably have to spend some time figuring out how tramp is put
together first).  So it appears I need to resolve this by dispensing
with the need to say "yes" every time.  But I have no idea how to do
that.  (And will it even solve my problem?  When we get past the
login, will input be transmitted correctly from tramp to ssh so tramp
can do what it needs to do?)

What is the correct way to solve this?  Do I need to put an ssh.bat in
my path somewhere that sets some cygwin-related environment variables
or maybe even tunnels through bash?  Will that even solve the problem?

What is a pseudo-terminal?  Is it a problem that "input is not a
terminal" when I'm using ssh from Emacs?  Is there a way to get an
Emacs buffer to fuction _as_ a terminal?  

TIA for any pointers.  I'm not sure which angle to approach this from.

-- 
(global-set-key [f12]     'call-last-kbd-macro)
(global-set-key [f11]     'start-kbd-macro)
(global-set-key [C-f11]   'end-kbd-macro)

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/