MSYS2-packages icon indicating copy to clipboard operation
MSYS2-packages copied to clipboard

sshpass: Failed to set controlling terminal in child (TIOCSCTTY): Invalid argument

Open shenlijun opened this issue 4 years ago • 10 comments

This error occurred with latest update

shenlijun avatar Apr 23 '21 11:04 shenlijun

When does this error happen?

lazka avatar Apr 23 '21 11:04 lazka

When does this error happen?

Normal use like: sshpass -p 'password' ssh root@ip

But it works fine before

shenlijun avatar Apr 23 '21 17:04 shenlijun

Same here - though I haven't used sshpass in a while (so not sure when it worked, if ever), this is what I got today (latest MSYS2 updates from today):

$ git svn clone svn+ssh://[email protected]/p/myproject/code/ myproject
...
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
([email protected]) Password:
        A       files/file.py
...
r100 = f2ec84c31d82401fb594bbc359eeec86c233b0b8 (refs/remotes/git-svn)
([email protected]) Password:
...

$ sshpass -e git svn clone svn+ssh://[email protected]/p/myproject/code/ myproject
sshpass: Failed to set controlling terminal in child (TIOCSCTTY): Invalid argument

EDIT: tried to rebuild sshpass from source, still the same problem - just logging my steps here:

$ svn checkout https://svn.code.sf.net/p/sshpass/code/trunk sshpass_svn
...
Checked out revision 77.

$ cd sshpass_svn/
$ ./bootstrap
./bootstrap: line 3: aclocal: command not found

$ pacman -S automake-wrapper
...

$ ./bootstrap
sh: line 1: autom4te: command not found
aclocal-1.16: error: autom4te failed with exit status: 127

$ pacman -S autoconf
...

$ ./bootstrap
...

$ ./configure
...
configure: error: in `/src/sshpass_svn':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details

$ pacman -S gcc

$ ./configure
...
config.status: error: in `/e/src/sshpass_svn':
config.status: error: Something went wrong bootstrapping makefile fragments
    for automatic dependency tracking.  If GNU make was not used, consider
    re-running the configure script with MAKE="gmake" (or whatever is
    necessary).  You can also try re-running configure with the
    '--disable-dependency-tracking' option to at least be able to build
    the package (albeit without support for automatic dependency tracking).
See `config.log' for more details

$ pacman -S make
...

$ ./configure
...

$ make
...

$ SSHPASS=aa ./sshpass.exe -e ssh
sshpass: Failed to set controlling terminal in child (TIOCSCTTY): Invalid argument

# restore - remove pacman- installed packages with dependencies (340 MiB):
$ pacman -Rcns automake-wrapper autoconf gcc make

sdbbs avatar Apr 29 '21 12:04 sdbbs

exactly the same problem.

cmal avatar Dec 30 '21 10:12 cmal

Yep. Fails in all environments: msys, mingw64, ucrt64, and Command Prompt too.

I'm using a Windows 10 Pro system and MSYS2 upgraded just now (4 May 2022) with pacman -Syu

Microsoft Windows [Version 10.0.19044.1586]

brendan-simon-indt avatar May 04 '22 04:05 brendan-simon-indt

The same here. Windows 11 Pro (21H2, 22000.652), MSYS2 up to date (2022-05-04).

amolinas avatar May 04 '22 11:05 amolinas

same

CloudyCity avatar Jul 05 '22 08:07 CloudyCity

Same problem. I wonder if a fix will be released?

pidgeon777 avatar Sep 13 '22 09:09 pidgeon777

Looks like it's a bug in sshpass. https://sourceforge.net/p/sshpass/bugs/24/

progheal avatar Sep 29 '22 00:09 progheal

still having this issue, WIN 10 MSYS2 MINGW64

sshpass: Failed to set controlling terminal in child (TIOCSCTTY): Invalid argument

zudsniper avatar Oct 03 '22 07:10 zudsniper