delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/02/27/18:29:29

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
To: cygwin AT cygwin DOT com
Subject: SSH client & NT Emacs
From: Keith Amidon <camalot AT picnicpark DOT org>
Date: 27 Feb 2001 15:27:35 -0800
Message-ID: <861ysjogew.fsf@camalot.picnicpark.org>
Lines: 53
User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7
MIME-Version: 1.0

I'm trying to use the cygwin openssh port within NT Emacs (the port
available at http://www.gnu.org/software/emacs/windows/ntemacs.html)
using the ssh.el and tramp packages. I have OpenSSH setup (version
2.3.0p1) and operating fine in a cygwin bash prompt window.

However, under emacs things do not work properly. I am using Cygwin
bash as my subshell under emacs, so bash is starting the ssh
executables. If I try to start an SSH session without having ssh-agent
running using either using M-x ssh as provided by the ssh.el package
or within a bash subshell window, I am told:

---- Start Output ----
Pseudo-terminal will not be allocated because stdin is not a terminal.
You have no controlling tty.  Cannot read passphrase.

Process *ssh-haven* exited abnormally with code 255
---- End Output ----

Fair enough, I think, emacs is communicating with the subshell over
some kind of pipe or something. Probably that isn't secure, so I
shouldn't do it. So, I setup ssh-agent and get it working with
emacs. Now when I attempt to connect, I get:

---- Start Output ----
Pseudo-terminal will not be allocated because stdin is not a terminal.
---- End Output ----

And then a blinking cursor. I can type commands, and they are executed
on the server, I get output, etc. However, I do *not* get a command
prompt. This makes using the remote window somewhat
difficult. Furthermore, because the tramp package depends on finding
prompts for its operations, it doesn't work either.

Can anybody suggest to me how I might fix this? I have tried passing
'-t' (allocate tty even though command given) to ssh, but I didn't
really expect this to work, and it didn't. Emacs has a variable
comint-ptyp that is supposed to indicate whether emacs is using a pty
or a pipe to communicate with subprocesses. NT Emacs reports this
variable as t, meaning that it thinks it is using a pty.  This seems
to indicate that NT Emacs idea of a pty and cygwin's idea of a pty are
different, but I have no clue how to debug further. Emacs also has a
variable that specifies the command used to launch the subshell,
called shell-file-name. I have this set to "bash" currently, as I
indicated before. Calling "M-x shell" brings up an interactive bash
subshell in Emacs that seems to work fine except for the issue with
ssh as described above.

If anyone can help me out, I would really appeciate it. I desparately
want to be able to edit files remotely within my local emacs session,
and PKI authenticated ssh/scp is the only way I can gain access to the
machines I need to use.

       Thanks, Keith


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019