Sorry: Forgot about our overenthusiastic attachment defanger.

W2kpro, sp2
Appears to close the socket immediately after connection.
ssh -v reports "Read from socket failed: Connection aborted"

A log of sshd (thanks to Max's instructions) shows
"Read from socket failed: Resource temporarily unavailable"

Tried deleting cygwin installation and reinstalling. Results attached.

Also tried backdating OpenSSL lib. Still didn't work :-( which suggests that
something else has changed on my system. Likely.

A search of microsoft.com for "Resource temporarily unavailable" yields:
WSAEWOULDBLOCK (10035)
Resource temporarily unavailable.
This error is returned from operations on nonblocking sockets that cannot be
completed immediately, for example recv when no data is queued to be read
from the socket. It is a nonfatal error, and the operation should be retried
later. It is normal for WSAEWOULDBLOCK to be reported as the result from
calling connect on a nonblocking SOCK_STREAM socket, since some time must
elapse for the connection to be established.

The only solution found so far is to completely reinstall W2k,
http://archive.erdelynet.com/ssh-l/2001-05/msg00003.php.

Spurious WSAEWOULDBLOCKs seem to have caused problems when closing sockets
http://www.cygwin.com/ml/cygwin-developers/2001-10/msg00212.html, and
also problems with postgres.

My theory, for what it is worth, is that windows is sending an event saying
that there is something ready to read from a socket, but returns
WSAEWOULDBLOCK when the program reads the socket. I think I read somewhere
in a Microsoft page that programs have to be able to cope with this
situation. It is likely a timing related.

HTH.

Regards
Campbell.

/var/log/sshd.log

debug1: sshd version OpenSSH_3.5p1
debug1: private host key: #0 type 0 RSA1
debug3: Not a RSA1 key file /etc/ssh_host_rsa_key.
debug1: read PEM private key done: type RSA
debug1: private host key: #1 type 1 RSA
debug3: Not a RSA1 key file /etc/ssh_host_dsa_key.
debug1: read PEM private key done: type DSA
debug1: private host key: #2 type 2 DSA
debug1: Bind to port 22 on 0.0.0.0.
Server listening on 0.0.0.0 port 22.
Generating 768 bit RSA key.
RSA key generation complete.
debug1: Server will not fork when running in debugging mode.
Connection from 127.0.0.1 port 1362
debug1: Client protocol version 2.0; client software version OpenSSH_3.5p1
debug1: match: OpenSSH_3.5p1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-1.99-OpenSSH_3.5p1
debug2: Network child is on pid 1700
debug3: preauth child monitor started
debug3: mm_request_receive entering
debug1: list_hostkey_types: ssh-rsa,ssh-dss
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: 
diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: 
aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,[EMAIL PROTECTED]
debug2: kex_parse_kexinit: 
aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,[EMAIL PROTECTED]
debug2: kex_parse_kexinit: 
hmac-md5,hmac-sha1,hmac-ripemd160,[EMAIL PROTECTED],hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: 
hmac-md5,hmac-sha1,hmac-ripemd160,[EMAIL PROTECTED],hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: first_kex_follows 0 
debug2: kex_parse_kexinit: reserved 0 
debug2: kex_parse_kexinit: 
diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: 
aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,[EMAIL PROTECTED]
debug2: kex_parse_kexinit: 
aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,[EMAIL PROTECTED]
debug2: kex_parse_kexinit: 
hmac-md5,hmac-sha1,hmac-ripemd160,[EMAIL PROTECTED],hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: 
hmac-md5,hmac-sha1,hmac-ripemd160,[EMAIL PROTECTED],hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: first_kex_follows 0 
debug2: kex_parse_kexinit: reserved 0 
debug2: mac_init: found hmac-md5
debug1: kex: client->server aes128-cbc hmac-md5 none
debug2: mac_init: found hmac-md5
debug1: kex: server->client aes128-cbc hmac-md5 none
Read from socket failed: Resource temporarily unavailable
debug1: Calling cleanup 0x41e630(0x0)
mm_request_receive: read: -1
$ ssh -v localhost
OpenSSH_3.5p1, SSH protocols 1.5/2.0, OpenSSL 0x0090608f
debug1: Reading configuration data /etc/ssh_config
debug1: Rhosts Authentication disabled, originating port will not be trusted.
debug1: ssh_connect: needpriv 0
debug1: Connecting to localhost [127.0.0.1] port 22.
debug1: Connection established.
debug1: identity file /home/Administrator/.ssh/identity type -1
debug1: identity file /home/Administrator/.ssh/id_rsa type -1
debug1: identity file /home/Administrator/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_3.5p1
debug1: match: OpenSSH_3.5p1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.5p1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
Read from socket failed: Connection aborted
debug1: Calling cleanup 0x41b1b0(0x0)
$ cygcheck -s

Cygwin Win95/NT Configuration Diagnostics
Current System Time: Mon Dec 16 09:47:43 2002

Windows 2000 Professional Ver 5.0 Build 2195 Service Pack 2

Path:   C:\cygwin\usr\local\bin
        C:\cygwin\bin
        C:\cygwin\bin
        C:\cygwin\bin
        c:\j2sdk1.4.1_01\jre\bin
        c:\j2sdk1.4.1_01\bin
        c:\WINNT\system32
        c:\WINNT
        c:\WINNT\System32\Wbem
        c:\Tools\Dos
        c:\Tools\Pkzip

SysDir: C:\WINNT\System32
WinDir: C:\WINNT

CYGWIN = `ntsec binmode tty codepage:oem'
HOME = `C:\cygwin\home\Administrator'
MAKE_MODE = `unix'
PWD = `/home/Administrator'
USER = `Administrator'

Use `-r' to scan registry

a:  fd           N/A    N/A
c:  hd  NTFS   17272Mb  31% CP CS UN PA FC     Toshiba-Disk
d:  cd           N/A    N/A
e:  hd  FAT32   1790Mb  69% CP    UN           WIN98

C:\cygwin                          /                         sys
C:\cygwin/bin                      /usr/bin                  sys
C:\cygwin/lib                      /usr/lib                  sys
C:\cygwin\usr\X11R6\lib\X11\fonts  /usr/X11R6/lib/X11/fonts  sys
.                                  /cygdrive                 use
drive

Found: C:\cygwin\bin\bash.exe
Found: C:\cygwin\bin\cat.exe
Not Found: cpp (good!)
Found: C:\cygwin\bin\find.exe
Not Found: gcc
Not Found: gdb
Not Found: ld
Found: C:\cygwin\bin\ls.exe
Not Found: make
Found: C:\cygwin\bin\sh.exe

   58k 2002/05/07 C:\cygwin\bin\cygbz2-1.dll
  644k 2002/12/08 C:\cygwin\bin\cygcrypto.dll
   45k 2001/04/25 C:\cygwin\bin\cygform5.dll
   35k 2002/01/09 C:\cygwin\bin\cygform6.dll
   19k 2002/02/20 C:\cygwin\bin\cyggdbm.dll
   17k 2001/06/28 C:\cygwin\bin\cyghistory4.dll
   20k 2002/10/10 C:\cygwin\bin\cyghistory5.dll
  929k 2002/06/24 C:\cygwin\bin\cygiconv-2.dll
   22k 2001/12/13 C:\cygwin\bin\cygintl-1.dll
   28k 2002/09/20 C:\cygwin\bin\cygintl-2.dll
   21k 2001/06/20 C:\cygwin\bin\cygintl.dll
   26k 2001/04/25 C:\cygwin\bin\cygmenu5.dll
   20k 2002/01/09 C:\cygwin\bin\cygmenu6.dll
  156k 2001/04/25 C:\cygwin\bin\cygncurses++5.dll
  175k 2002/01/09 C:\cygwin\bin\cygncurses++6.dll
  226k 2001/04/25 C:\cygwin\bin\cygncurses5.dll
  202k 2002/01/09 C:\cygwin\bin\cygncurses6.dll
   15k 2001/04/25 C:\cygwin\bin\cygpanel5.dll
   12k 2002/01/09 C:\cygwin\bin\cygpanel6.dll
   40k 2001/11/21 C:\cygwin\bin\cygpcre.dll
   39k 2001/11/21 C:\cygwin\bin\cygpcreposix.dll
   22k 2002/06/09 C:\cygwin\bin\cygpopt-0.dll
  108k 2001/06/28 C:\cygwin\bin\cygreadline4.dll
  127k 2002/10/10 C:\cygwin\bin\cygreadline5.dll
  165k 2002/12/08 C:\cygwin\bin\cygssl.dll
   50k 2002/03/12 C:\cygwin\bin\cygz.dll
  923k 2002/11/27 C:\cygwin\bin\cygwin1.dll
    Cygwin DLL version info:
        DLL version: 1.3.17
        DLL epoch: 19
        DLL bad signal mask: 19005
        DLL old termios: 5
        DLL malloc env: 28
        API major: 0
        API minor: 67
        Shared data: 3
        DLL identifier: cygwin1
        Mount registry: 2
        Cygnus registry name: Cygnus Solutions
        Cygwin registry name: Cygwin
        Program options name: Program Options
        Cygwin mount registry name: mounts v2
        Cygdrive flags: cygdrive flags
        Cygdrive prefix: cygdrive prefix
        Cygdrive default prefix:
        Build date: Wed Nov 27 18:54:29 EST 2002
        Shared id: cygwin1S3


Cygwin Package Information
Package             Version
_update-info-dir    00098-1
ash                 20020731-1
base-files          1.1-1
base-passwd         1.0-1
bash                2.05b-8
bzip2               1.0.2-2
cpio                2.4.2
cron                3.0.1-7
cygrunsrv           0.95-1
cygutils            1.1.3-1
cygwin              1.3.17-1
cygwin-doc          1.2-1
diff                1.0-1
diffutils           2.8.1-1
ed                  0.2-1
fileutils           4.1-1
findutils           4.1.7-4
fortune             1.8-2
gawk                3.1.1-5
gdbm                1.8.0-4
grep                2.5-1
groff               1.17.2-1
gzip                1.3.3-4
less                374-1
libbz2_1            1.0.2-2
libiconv2           1.8-2
libintl             0.10.38-3
libintl1            0.10.40-1
libintl2            0.11.5-1
libncurses5         5.2-1
libncurses6         5.2-8
libpopt0            1.6.4-4
libreadline4        4.1-2
libreadline5        4.3-2
login               1.7-1
man                 1.5g-2
mc                  4.5.55-1
nano                1.1.10-1
ncurses             5.2-8
newlib-man          20020801
openssh             3.5p1-2
openssl             0.9.6h-1
pcre                3.7-1
perl                5.6.1-2
perl_manpages       5.8.0-1
readline            4.3-2
sed                 4.0.1-1
sh-utils            2.0-3
sharutils           4.2.1-2
tar                 1.13.25-1
termcap             20020930-1
terminfo            5.2-3
texinfo             4.2-4
textutils           2.0.21-1
time                1.7-1
unzip               5.50-1
vim                 6.1-2
wget                1.8.2-1
which               1.5-1
zip                 2.3-2
zlib                1.1.4-1


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply via email to