public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: sshd service removed by Windows 10 update 1803
       [not found] <5b4fd2ad.1c69fb81.3e7e4.c9cdSMTPIN_ADDED_MISSING@mx.google.com>
@ 2018-07-19 15:09 ` madhu gupta
  0 siblings, 0 replies; 2+ messages in thread
From: madhu gupta @ 2018-07-19 15:09 UTC (permalink / raw)
  To: cygwin

Thanks.

On Thu, Jul 19, 2018 at 5:51 AM, Cliff Geschke <
cliff.geschke@preciseautomation.com> wrote:

> As part of a Windows 10 update 1803 a few days ago, the cygwin sshd
> service was
> removed, keeping my users from accessing my server.  I had been
> successfully
> using sshd for several years and it has survived numerous windows updates.
>
> Here is what I have done to fix it:
>
> Disable the following services via W10 computer management.
>   OpenSSH Authentication Agent
>   SSH Server Broker
>   SSH Server Proxy
>   SSHdBroker
>
> I'm not sure all those need to be disabled.
>
> Run a bash shell as administrator, and reinstall sshd using cygrunsrv
>
> cygrunsrv --stop sshd
> cygrunsrv --remove sshd
> cygrunsrv --install sshd --path /usr/sbin/sshd.exe --user cyg_server
> cygrunsrv --start sshd
>
> You will get an error from the start command:
>   cygrunsrv: Error starting a service: QueryServiceStatus:  Win32 error
> 1062:
>   The service has not been started.
>
> The task manager shows sshd is indeed running, and remote ssh clients can
> log
> in.  So I am ignoring the error.
>
> cygrunsrv -Q sshd shows the service is stopped.  And W10 computer
> management
> shows it is stopped.  If you try to start it again, it will fail because
> the
> sshd task has a hold on the TCP ports.  If you want to stop/restart to edit
> config files, you need to directly kill the sshd task.
>
> After a system restart, W10 starts the correct sshd again.
>
> Simply using "cygrunsrv --install sshd" without --path, installs the MS
> sshd.
> Not what I want.
>
> If you don't specify --user with the --install, W10 will use SYSTEM which
> does
> not have the permissions (SeTcbPrivilege etc) to change to the client
> user.  So
> you get seteuid Operation Not Permitted errors when a remote client tries
> and
> fails to login.  I discovered this the hard way.
>
> BTW, I didn't want to start over with ssh-host-config because I didn't
> want to
> risk invalidating my encryption keys and confuse my remote clients.
>
> Except for the weirdness where computer management and cygrunsrv -Q show
> the
> service is stopped, everything seems to work okay and my users are happy
> again.
>
> Cliff Geschke
> Precise Automation
>
>
>
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>
>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 2+ messages in thread

* sshd service removed by Windows 10 update 1803
@ 2018-07-19 12:39 Cliff Geschke
  0 siblings, 0 replies; 2+ messages in thread
From: Cliff Geschke @ 2018-07-19 12:39 UTC (permalink / raw)
  To: cygwin

As part of a Windows 10 update 1803 a few days ago, the cygwin sshd service was
removed, keeping my users from accessing my server.  I had been successfully
using sshd for several years and it has survived numerous windows updates.

Here is what I have done to fix it:

Disable the following services via W10 computer management.
  OpenSSH Authentication Agent
  SSH Server Broker
  SSH Server Proxy
  SSHdBroker

I'm not sure all those need to be disabled.

Run a bash shell as administrator, and reinstall sshd using cygrunsrv

cygrunsrv --stop sshd
cygrunsrv --remove sshd
cygrunsrv --install sshd --path /usr/sbin/sshd.exe --user cyg_server
cygrunsrv --start sshd

You will get an error from the start command: 
  cygrunsrv: Error starting a service: QueryServiceStatus:  Win32 error 1062:
  The service has not been started.

The task manager shows sshd is indeed running, and remote ssh clients can log
in.  So I am ignoring the error.

cygrunsrv -Q sshd shows the service is stopped.  And W10 computer management
shows it is stopped.  If you try to start it again, it will fail because the
sshd task has a hold on the TCP ports.  If you want to stop/restart to edit
config files, you need to directly kill the sshd task.

After a system restart, W10 starts the correct sshd again.

Simply using "cygrunsrv --install sshd" without --path, installs the MS sshd.
Not what I want.

If you don't specify --user with the --install, W10 will use SYSTEM which does
not have the permissions (SeTcbPrivilege etc) to change to the client user.  So
you get seteuid Operation Not Permitted errors when a remote client tries and
fails to login.  I discovered this the hard way.

BTW, I didn't want to start over with ssh-host-config because I didn't want to
risk invalidating my encryption keys and confuse my remote clients.

Except for the weirdness where computer management and cygrunsrv -Q show the
service is stopped, everything seems to work okay and my users are happy again.

Cliff Geschke
Precise Automation



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-07-19  4:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <5b4fd2ad.1c69fb81.3e7e4.c9cdSMTPIN_ADDED_MISSING@mx.google.com>
2018-07-19 15:09 ` sshd service removed by Windows 10 update 1803 madhu gupta
2018-07-19 12:39 Cliff Geschke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).