This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: SSH client & NT Emacs


At 06:27 PM 2/27/2001, Keith Amidon wrote:
>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



I believe you'll find this is an issue with NTEmacs and Cygwin apps.  You 
can check the mail archives on this.  My uninformed answer to you is that
you need to be able to have Emacs working in tty mode which you can 
accomplish through setting "tty" in the Cygwin environment variable (after
which you need to stop all Cygwin processes and restart them).  However,
this won't get you very far unless you have a Cygwin version of Emacs I'm
afraid.  I've heard XEmacs works.



Larry


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]