This is the mail archive of the cygwin 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]
Other format: [Raw text]

Re: TTY and sshpass

On Feb 10 18:03, Sylvain Archenault wrote:
> > On 2/9/2012 7:46 PM, Sylvain Archenault wrote:
> > I've been using sshpass ( for a
> > while and it stopped working after I updated cygwin to the last version
> > 1.7.10-1 (was wokring with 1.7.9).
> [...]
> I'm going to contact sshpass author.

Apart from the fact that sshpass is a very dangerous package for your
security, and that you should prefer using public keys over using
sshpass, this seems to be not exactly a sshpass problem.  Rather it's a
change in the 1.7.10 Cygwin DLL which triggers this behaviour.

As a temporary workaround, try this patch to sshpass:

--- main.c.orig	2012-02-11 11:22:44.563278057 +0100
+++ main.c	2012-02-11 11:16:26.220409437 +0100
@@ -265,7 +265,8 @@ int runprogram( int argc, char *argv[] )
         // This line makes the ptty our controlling tty. We do not otherwise need it open
         slavept=open(name, O_RDWR );
-        close( slavept );
+        //close( slavept );
+	open ("/dev/tty", O_RDWR);
 	close( masterpt );


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

Problem reports:
Unsubscribe info:

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