sshd service needs to be restarted after every boot

Jörg Gerlach
Tue Aug 14 21:35:00 GMT 2012


I try to run sshd as a service on a windows 7 system. All works fine 
after I manually stops and start the sshd service (with "net stop/start 
sshd" command). But without that the client shows:

     client@server:/root$ ssh -vvv -p 2222 user@windowsPC
     OpenSSH_5.9p1 Debian-5ubuntu1, OpenSSL 1.0.1 14 Mar 2012
     debug1: Reading configuration data /etc/ssh/ssh_config
     debug1: /etc/ssh/ssh_config line 19: Applying options for *
     debug2: ssh_connect: needpriv 0
     debug1: Connecting to windowsPC [] port 2222.
     debug1: Connection established.
     debug3: Incorrect RSA1 identifier
     debug3: Could not load "/client/.ssh/id_rsa" as a RSA1 public key
     debug1: identity file /client/.ssh/id_rsa type 1
     debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
     debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
     debug1: identity file /client/.ssh/id_rsa-cert type -1
     debug1: identity file /client/.ssh/id_dsa type -1
     debug1: identity file /client/.ssh/id_dsa-cert type -1
     debug1: identity file /client/.ssh/id_ecdsa type -1
     debug1: identity file /client/.ssh/id_ecdsa-cert type -1
     debug1: Remote protocol version 2.0, remote software version 
     debug1: match: OpenSSH_6.0 pat OpenSSH*
     debug1: Enabling compatibility mode for protocol 2.0
     debug1: Local version string SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1
     debug2: fd 3 setting O_NONBLOCK
     debug3: put_host_port: [windowsPC]:2222
     debug3: load_hostkeys: loading entries for host "[windowsPC]:2222" 
from file "/client/.ssh/known_hosts"
     debug3: load_hostkeys: found key type ECDSA in file 
     debug3: load_hostkeys: loaded 1 keys
     debug3: order_hostkeyalgs: prefer hostkeyalgs:,,,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
     debug1: SSH2_MSG_KEXINIT sent
     Connection closed by

and on the windows host I get an error event from sshd:

     sshd: PID 1104: fatal: Write failed: Socket operation on non-socket 

The installation and configuration of the sshd-service was made with 
following steps:

     1) Install cygwin with an extra administrator account (Packages: 
openssh, vim, wget, curl, mc, rsync, shutdown)
     2) run ssh-host-config (reply all questions with "yes", keep 
default values for cygwin deamon and name)
     3) add rules for the windows firewall and start sshd
     4) ssh-copy-id from the client to the windows host

I already use sshd on other windows7 systems successfully with the same 
configuration. There I don't need to restart the sshd service after boot.

Jörg Gerlach.

Problem reports:
Unsubscribe info:

More information about the Cygwin mailing list