This is the mail archive of the
mailing list for the Cygwin project.
1.7.7: Win7 SSHD, chown bad file descriptor
- From: Jeff Odegard <jeff dot odegard at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Fri, 12 Nov 2010 21:20:16 -0700
- Subject: 1.7.7: Win7 SSHD, chown bad file descriptor
Today I installed Cygwin 1.7.7 on Windows 7 Enterprise. OpenSSH version
is OpenSSH_5.6p1, OpenSSL 0.9.8o 01 Jun 2010
With admin privileges, I set up sshd as a service using ssh-host-config,
and said yes to all questions except I kept the cyg_server username.
The service started fine, then I tried to ssh to the system, entered
user/pass, and was immediately disconnected. The windows application
log had the following error:
sshd: PID 728: fatal: chown(/dev/tty0, 1000, 1002) failed: Bad file
$ ls -la /dev/tty0
crw------- 1 SYSTEM Administrators 136, 0 2010-11-12 14:41 /dev/tty0
(I noticed on older Cygwins on XP this is crw-rw-rw- Can I change
this? Will it stay permanent on reboot? This looks like a security
issue, having a tty world read/writable.)
I tried several options with the Windows service. I noticed in the
ssh-host-config script that it uses ntsec, which is no longer
supported. I tried using acl, noacl, ntsec, nontsec - all with no
effect. Here is my latest attempt:
$ cygrunsrv -I sshd -d "CYGWIN sshd" -p /usr/sbin/sshd.exe --desc
"Cygwin Secure Shell Daemon" -a "-D" -e CYGWIN="noacl tty
nodosfilewarning" -y tcpip -u cyg_server
I thought it might be a problem with the sshd privilege separation, but
these look OK:
$ ls -la /var/empty
drwx------+ 1 cyg_server Administrators 0 2010-11-12 21:15 .
drwxr-xr-x+ 1 odegardj Administrators 4096 2010-11-12 23:34 ..
$ grep ssh /etc/passwd
Any thoughts on what I might try next. I googled, but couldn't find
anything that worked.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple