delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/08/03/04:38:02

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <20000803083719.29790.qmail@nwcst277.netaddress.usa.net>
Date: 3 Aug 00 02:37:19 MDT
From: <norbert DOT bladt AT www DOT usa DOT net>
To: cygwin AT sources DOT redhat DOT com
Subject: OpenSSH as a service (Was: OpenSSH through inetd)
CC: dumser AT bigfoot DOT com
X-Mailer: USANET web-mailer (34FM0700.1.03)
Mime-Version: 1.0
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id EAA31487

Corinna Vinschen wrote:
> 
> James Dumser wrote:
> >
> > On Wed, 02 Aug 2000 19:40:35 +0200, Corinna Vinschen wrote:
> > > Has anybody of you tried to install sshd as service from LocalSystem
> > > account started via SRVANY.EXE instead of inetd?
> >
> > Would you mind posting some instructions (or a reference to
> > instructions) for getting it started via SRVANY? I'd be happy to try
> > this out, and was in fact a little put off by the comments on -i in the
> > sshd man page.
> 
> SRVANY.EXE and INSTSRV.EXE are tools from the NT resource kit.
> 
> Assuming your SRVANY.EXE is in D:/usr/local/bin and your
> sshd is in D:/usr/local/sbin:
[removed to save bandiwdth]
...

> Stop sshd (this is the complex part) by calling:
> 
>         net stop sshd
>         kill -9 <sshd_pid>
This last statement drove me crazy until I figured that one out.
The problem with this - and the cygwin implementation - is
that:
        If you change the /etc/passwd file, you'll have to reboot (!)
        to get the changes reflected or you know somehow or figured it
        out that there is still an sshd running and you have to kill it.
        (Taskmanager, sshd -> End Task).
The implementation of getpwent, etc. in cygwin is - according to
the 1.1.2 source - that /etc/passwd is just read once. Which is fine,
but for testing this special case - you know the CRLF vs. LF thing in
/etc/passwd) this is not very helpful.

Of course, you can start a new "sshd service" without problems or errors
reported,
but the old one is still running and either there is a sort-of random
which one gets
used or - in my case - the old one is used.
 
> Hope, that helps,
Yes, thanks.

The question is: How do I get the pid of the still running old sshd ?
The PID is written in the "PidFile" given in the sshd_config.
However, the problem in 2.1.0p3 is, again, the "CRLF" at the
end of this file. So, I can't use it, at all to kill the sshd
via
	kill -9 `cat /var/run/sshd.pid`
Neither "echo" nor "cat" work because of the CRLF.
Is that fixed in 2.1.1p4 ?

Norbert.


--

Norbert Bladt
E-Mail: norbert DOT bladt AT adi DOT ch

____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019