cannot start sshd on cygwin- win xp - SSH
This is a discussion on cannot start sshd on cygwin- win xp - SSH ; a selection of all the error message I am getting. Messing around
trying to start it.
it doesn`t show up on netstat -an. I did install and uninstall a
windows port of openssh, I don`T know if that messed things ...
-
cannot start sshd on cygwin- win xp
a selection of all the error message I am getting. Messing around
trying to start it.
it doesn`t show up on netstat -an. I did install and uninstall a
windows port of openssh, I don`T know if that messed things up. But
nothing i easily do about that if it did..
$ cygrunsrv -I sshd -p /usr/sbin/sshd
cygrunsrv: Error installing a service: OpenService: Win32 error 1073:
The specified service already exists.
$ net start sshd
The CYGWIN sshd service is starting.
The CYGWIN sshd service was started successfully.
Current user@minitough ~
$ net start sshd
The CYGWIN sshd service is starting.
The CYGWIN sshd service was started successfully.
It doesn`t show in netstat. maybe it isn`T menat to ?
$ cygrunsrv --start sshd
cygrunsrv: Error starting a service: QueryServiceStatus: Win32 error
1062:
The service has not been started.
...
$ net start sshd
The CYGWIN sshd service is starting.
The CYGWIN sshd service could not be started.
The service did not report an error.
More help is available by typing NET HELPMSG 3534.
Current user@minitough /usr/sbin
$ net stop sshd
The CYGWIN sshd service is not started.
More help is available by typing NET HELPMSG 3521.
Current user@minitough /usr/sbin
$ net start sshd
The CYGWIN sshd service is starting.
The CYGWIN sshd service was started successfully.
Current user@minitough /usr/sbin
$ net stop sshd
The CYGWIN sshd service is not started.
More help is available by typing NET HELPMSG 3521.
........
Current user@minitough /
$ cygrunsrv -S sshd
cygrunsrv: Error starting a service: QueryServiceStatus: Win32 error
1062:
The service has not been started.
......
Current user@minitough /
$ cygrunsrv -S /usr/sbin/sshd
cygrunsrv: Error starting a service: OpenService: Win32 error 123:
The filename, directory name, or volume label syntax is incorrect.
Current user@minitough /
$ cygrunsrv -S sshd
Current user@minitough /
$ ls /usr/sbin/sshd
/usr/sbin/sshd
-
Re: cannot start sshd on cygwin- win xp
wrote in message
news:1193616853.133644.61090@22g2000hsm.googlegrou ps.com...
>a selection of all the error message I am getting. Messing around
> trying to start it.
>
> it doesn`t show up on netstat -an. I did install and uninstall a
> windows port of openssh, I don`T know if that messed things up. But
> nothing i easily do about that if it did..
>
>
>
I don't have an answer to your cygwin issues but I will recommend using
copSSH as an alternative for your windows SSH server package of choice.
copSSH is based on OpenSSH/OpenSSL/cygwin and is actively maintained and
updated as those are updated. I currently run copSSH 1.4.3 on a Vista
Ultimate desktop and have run copSSH on an XP Pro box in the past.
http://www.itefix.no/phpws/index.php...sition=149:149
The copSSH support forum...
http://www.itefix.no/phpws/index.php...WS_MAN_ITEMS=2
To uninstall cygwin see this from the FAQ...
http://cygwin.com/faq/faq.setup.html....uninstall-all
FWIW, here is my small SSH links page...
http://theillustratednetwork.mvps.or...cureShell.html
--
Al Jarvi (MS-MVP Windows Networking)
Please post *ALL* questions and replies to the news group for the
mutual benefit of all of us...
The MS-MVP Program - http://mvp.support.microsoft.com
This posting is provided "AS IS" with no warranties, and confers no
rights...
How to ask a question
http://support.microsoft.com/KB/555375
-
Re: cannot start sshd on cygwin- win xp
jameshanley39@yahoo.co.uk wrote:
> $ net start sshd
> The CYGWIN sshd service is starting.
> The CYGWIN sshd service was started successfully.
>
>
> Current user@minitough ~
> $ net start sshd
> The CYGWIN sshd service is starting.
> The CYGWIN sshd service was started successfully.
>
> It doesn`t show in netstat. maybe it isn`T menat to ?
It is meant to. I'm supposing that the start is failing. Perhaps (as
an administrator) you could try /usr/sbin/sshd -d and see if you see any
error messages.
--
Darren Dunham ddunham@taos.com
Senior Technical Consultant TAOS http://www.taos.com/
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >
-
Re: cannot start sshd on cygwin- win xp
Darren Dunham wrote:
> jameshanley39@yahoo.co.uk wrote:
> > $ net start sshd
> > The CYGWIN sshd service is starting.
> > The CYGWIN sshd service was started successfully.
> >
> >
> > Current user@minitough ~
> > $ net start sshd
> > The CYGWIN sshd service is starting.
> > The CYGWIN sshd service was started successfully.
> >
> > It doesn`t show in netstat. maybe it isn`T menat to ?
>
> It is meant to. I'm supposing that the start is failing. Perhaps (as
> an administrator) you could try /usr/sbin/sshd -d and see if you see
> any error messages.
I don`t know if it writes errors to a file somewhere - I doubt it `cos
*nix philosophy. But nothing comes on the screen.
--
-
Re: cannot start sshd on cygwin- win xp
jameshanley39@yahoo.co.uk wrote:
> Darren Dunham wrote:
>> It is meant to. I'm supposing that the start is failing. Perhaps (as
>> an administrator) you could try /usr/sbin/sshd -d and see if you see
>> any error messages.
>
> I don`t know if it writes errors to a file somewhere - I doubt it `cos
> *nix philosophy. But nothing comes on the screen.
That's quite odd then. It should be a normal debug printout...
$ uname -s
CYGWIN_NT-5.1
$ /usr/sbin/sshd -d
debug1: sshd version OpenSSH_4.6p1
debug1: private host key: #0 type 0 RSA1
debug1: read PEM private key done: type RSA
debug1: private host key: #1 type 1 RSA
debug1: read PEM private key done: type DSA
debug1: private host key: #2 type 2 DSA
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-d'
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.
[...]
Can you strace it?
$ strace /usr/sbin/sshd -d
--
Darren Dunham ddunham@taos.com
Senior Technical Consultant TAOS http://www.taos.com/
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >
-
Re: cannot start sshd on cygwin- win xp
Darren Dunham wrote:
> jameshanley39@yahoo.co.uk wrote:
> > Darren Dunham wrote:
>
> >> It is meant to. I'm supposing that the start is failing. Perhaps
> (as >> an administrator) you could try /usr/sbin/sshd -d and see if
> you see >> any error messages.
> >
> > I don`t know if it writes errors to a file somewhere - I doubt it
> > `cos *nix philosophy. But nothing comes on the screen.
>
> That's quite odd then. It should be a normal debug printout...
>
> $ uname -s
> CYGWIN_NT-5.1
> $ /usr/sbin/sshd -d
> debug1: sshd version OpenSSH_4.6p1
> debug1: private host key: #0 type 0 RSA1
> debug1: read PEM private key done: type RSA
> debug1: private host key: #1 type 1 RSA
> debug1: read PEM private key done: type DSA
> debug1: private host key: #2 type 2 DSA
> debug1: rexec_argv[0]='/usr/sbin/sshd'
> debug1: rexec_argv[1]='-d'
> 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.
> [...]
>
> Can you strace it?
>
> $ strace /usr/sbin/sshd -d
$ uname -s
CYGWIN_NT-5.1
--
good thinking batman, looks like you hit a nerve
on doing strace
A box came up in windows saying
"
sshd.exe Unable to locate component
This application has failed to start because cygcrypto-0.9.8.dll was
not found. Re-installing the application may fix the problem.
"
I got that message and these messages below, every time I did the strace
in cygwin,
$ strace /usr/sbin/sshd -d
--- Process 736, exception C0000135 at 77F95C64
Current user@bobyc /usr/sbin
$ strace /usr/sbin/sshd -d
--- Process 3036, exception C0000135 at 77F95C64
Current user@bobyc /usr/sbin
$ strace /usr/sbin/sshd -d
--- Process 3948, exception C0000135 at 77F95C64
I did
c:\cygwin>dir *.dll /s
the closest I got was
cygcrypt-0.dll
C:\WINDOWS>dir cyg*.dll /s >a
File Not Found
do you have the file cygcrypto-0.9.8.dll in your cygwin\bin ?
thanks
-
Re: cannot start sshd on cygwin- win xp
"jameshanley39@yahoo.co.uk" wrote:
> Darren Dunham wrote:
>
> > jameshanley39@yahoo.co.uk wrote:
> > > $ net start sshd
> > > The CYGWIN sshd service is starting.
> > > The CYGWIN sshd service was started successfully.
> > >
> > >
> > > Current user@minitough ~
> > > $ net start sshd
> > > The CYGWIN sshd service is starting.
> > > The CYGWIN sshd service was started successfully.
> > >
> > > It doesn`t show in netstat. maybe it isn`T menat to ?
> >
> > It is meant to. I'm supposing that the start is failing. Perhaps (as
> > an administrator) you could try /usr/sbin/sshd -d and see if you see
> > any error messages.
>
> I don`t know if it writes errors to a file somewhere - I doubt it `cos
> *nix philosophy. But nothing comes on the screen.
Messages (if any) are written to Windows' eventlog:
control panel-administration-eventlog-applications
unless you also run cygwin's syslog-ng, see the thread beginning with
news:1190772415.045717.281010@19g2000hsx.googlegro ups.com
--
Wilfried Hennings
please reply in the newsgroup, the e-mail address is invalid
-
Re: cannot start sshd on cygwin- win xp
jameshanley39@yahoo.co.uk wrote:
> $ uname -s
> CYGWIN_NT-5.1
What about the 'sshd -d' and the strace?
--
Darren Dunham ddunham@taos.com
Senior Technical Consultant TAOS http://www.taos.com/
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >
-
Re: cannot start sshd on cygwin- win xp
Darren Dunham wrote:
> jameshanley39@yahoo.co.uk wrote:
> > $ uname -s
> > CYGWIN_NT-5.1
>
> What about the 'sshd -d' and the strace?
I interspersed that in in that post. I`ll repeat here
it looks like you hit a nerve with the strace
on doing strace
A box came up in windows saying
"
sshd.exe Unable to locate component
This application has failed to start because cygcrypto-0.9.8.dll was
not found. Re-installing the application may fix the problem.
"
I got that message and these messages below, every time I did the strace
in cygwin,
$ strace /usr/sbin/sshd -d
--- Process 736, exception C0000135 at 77F95C64
Current user@bobyc /usr/sbin
$ strace /usr/sbin/sshd -d
--- Process 3036, exception C0000135 at 77F95C64
Current user@bobyc /usr/sbin
$ strace /usr/sbin/sshd -d
--- Process 3948, exception C0000135 at 77F95C64
I did
c:\cygwin>dir *.dll /s
the closest I got was
cygcrypt-0.dll
C:\WINDOWS>dir cyg*.dll /s >a
File Not Found
do you have the file cygcrypto-0.9.8.dll in your cygwin\bin ?
thanks
--
-
Re: cannot start sshd on cygwin- win xp
jameshanley39@yahoo.co.uk wrote:
> I did
> c:\cygwin>dir *.dll /s
> the closest I got was
> cygcrypt-0.dll
>
> C:\WINDOWS>dir cyg*.dll /s >a
> File Not Found
>
> do you have the file cygcrypto-0.9.8.dll in your cygwin\bin ?
Apparently I do...
$ ls -ln /bin/*crypto*dll
-rwxr-x---+ 1 89617 545 1151538 Oct 4 2006 /bin/cygcrypto-0.9.7.dll
-rwxr-x---+ 1 89617 545 1083904 Mar 29 2007 /bin/cygcrypto-0.9.8.dll
Further:
$ zgrep cygcrypto /etc/setup/*
/etc/setup/openssl.lst.gz:usr/bin/cygcrypto-0.9.8.dll
/etc/setup/openssl097.lst.gz:usr/bin/cygcrypto-0.9.7.dll
So it would seem to be part of the openssl package. On my machine, I
appear to be back at 0.9.8g-1.
--
Darren Dunham ddunham@taos.com
Senior Technical Consultant TAOS http://www.taos.com/
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >
-
Re: cannot start sshd on cygwin- win xp
Darren Dunham wrote:
> So it would seem to be part of the openssl package. On my machine, I
> appear to be back at 0.9.8g-1.
Whoops. Not that I think it matters much in this case, but I wrote the
wrong version down. Current is 0.9.8g-1. I have 0.9.8e-3 installed.
--
Darren Dunham ddunham@taos.com
Senior Technical Consultant TAOS http://www.taos.com/
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >
-
Re: cannot start sshd on cygwin- win xp
Darren Dunham wrote:
> jameshanley39@yahoo.co.uk wrote:
> > I did
> > c:\cygwin>dir *.dll /s
> > the closest I got was
> > cygcrypt-0.dll
> >
> > C:\WINDOWS>dir cyg*.dll /s >a
> > File Not Found
> >
> > do you have the file cygcrypto-0.9.8.dll in your cygwin\bin ?
>
> Apparently I do...
>
> $ ls -ln /bin/*crypto*dll
> -rwxr-x---+ 1 89617 545 1151538 Oct 4 2006 /bin/cygcrypto-0.9.7.dll
> -rwxr-x---+ 1 89617 545 1083904 Mar 29 2007 /bin/cygcrypto-0.9.8.dll
>
> Further:
> $ zgrep cygcrypto /etc/setup/*
> /etc/setup/openssl.lst.gz:usr/bin/cygcrypto-0.9.8.dll
> /etc/setup/openssl097.lst.gz:usr/bin/cygcrypto-0.9.7.dll
>
> So it would seem to be part of the openssl package. On my machine, I
> appear to be back at 0.9.8g-1.
thanks for the accurate tests. Indeed, openssl was the source of the
problem.
I had chosen not to install openssl , on the understanding that SSH
does not use SSL.
And when I had tried reinstalling cygwin, and even installing openssl,
I was prob going about it wrong. I wasn`t uninstalling it right. I
should`ve removed not just \cygwin but \cyginst too. So I could start
from scratch telling cygwin what programs to install. Since then, I
have just installed cygwin to \cygwin so it is in one directory. Makes
uninstalling it clearer!
Now I have the opposite problem though. netstat -an shows it listening
on port 22.
But I cannot stop it from listening.
and if I use cygrunsrv to "stop" it, then "remove" it
then it still listens
if I then use cygrunsrv to "install" it then "start" it
or I use cygrunsrv to install it, and then I use net start sshd, then
I get errors.
Current user@minitough ~
$ net start sshd
The sshd service is starting.
The sshd service could not be started.
The service did not report an error.
More help is available by typing NET HELPMSG 3534.
Current user@minitough ~
$ net stop sshd
The sshd service is not started.
More help is available by typing NET HELPMSG 3521.
Current user@minitough ~
$ cygrunsrv.exe -S sshd
cygrunsrv: Error starting a service: QueryServiceStatus: Win32 error
1062:
The service has not been started.
Current user@minitough ~
$ cygrunsrv.exe -E sshd
Current user@minitough ~
$ cygrunsrv.exe -S sshd
cygrunsrv: Error starting a service: QueryServiceStatus: Win32 error
1062:
The service has not been started.
--
-
Re: cannot start sshd on cygwin- win xp
jameshanley39@yahoo.co.uk wrote:
> I had chosen not to install openssl , on the understanding that SSH
> does not use SSL.
Right. It doesn't use "SSL", but it does use some of the cryptographic
routines in the openssl library.
> Now I have the opposite problem though. netstat -an shows it listening
> on port 22.
So there's still a copy running. The question is whether it's one run
from the shell or something else (or maybe another server besides the
one you're testing?)
Can you reboot the machine? Does it launch at start? (likely a service
of some sort then...)
--
Darren Dunham ddunham@taos.com
Senior Technical Consultant TAOS http://www.taos.com/
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >
-
Re: cannot start sshd on cygwin- win xp
Darren Dunham wrote:
> jameshanley39@yahoo.co.uk wrote:
> > I had chosen not to install openssl , on the understanding that SSH
> > does not use SSL.
>
> Right. It doesn't use "SSL", but it does use some of the
> cryptographic routines in the openssl library.
>
> > Now I have the opposite problem though. netstat -an shows it
> > listening on port 22.
>
> So there's still a copy running. The question is whether it's one run
> from the shell or something else (or maybe another server besides the
> one you're testing?)
>
> Can you reboot the machine? Does it launch at start? (likely a
> service of some sort then...)
I rebooted the machine and it did not start.
On further tests based on the methods you have mentioned..
I have since reinstalled cygwin, this time with OpenSSL
I found that the strace command, started sshd and sort of occupied the
window, did not return me to a shell to enter more commands in that
window. Not a problem, I can open another cygwin window.
Closing that strace window, stopped the sshd server.
So, restarting windows, stops the sshd server too. For that reason.
But it won`t start with the typical commands!!! The only way to start
it is with strace
These are the "typical commands" I refer to, as commands that won`t
start sshd.
Current user@minitough ~
$ cygrunsrv -R sshd
Current user@minitough ~
$ cygrunsrv -I sshd -p /usr/sbin/sshd
Current user@minitough ~
$ cygrunsrv -S sshd
cygrunsrv: Error starting a service: QueryServiceStatus: Win32 error
1062:
The service has not been started.
Current user@minitough ~
$ net start sshd
The sshd service is starting.
The sshd service could not be started.
The service did not report an error.
More help is available by typing NET HELPMSG 3534.
--
-
Re: cannot start sshd on cygwin- win xp
jameshanley39@yahoo.co.uk wrote:
> I rebooted the machine and it did not start.
> On further tests based on the methods you have mentioned..
>
> I have since reinstalled cygwin, this time with OpenSSL
>
> I found that the strace command, started sshd and sort of occupied the
> window, did not return me to a shell to enter more commands in that
> window. Not a problem, I can open another cygwin window.
Let's start slow. Make sure the server works properly before trying to
turn it into a service.
When run with no options (no '-d' right?) then it should return control
in your shell.
Do you see information in your event viewer? When I run sshd I get a
nice message about sshd: PID XXX: Server listening on 0.0.0.0 port 22.
Anything different for you?
How about when you try to run it as a service?
> Current user@minitough ~
> $ net start sshd
> The sshd service is starting.
> The sshd service could not be started.
>
> The service did not report an error.
>
> More help is available by typing NET HELPMSG 3534.
And what does thoat help message display?
I'm not sure where I found this, but I think that the service runner
expects that the program it's running will stick around (in other words,
doesn't create a separate daemon). So I run my ssh with -D when I'm
invoking as a service, and without it when invoking from a shell.
$ /usr/sbin/sshd
[pause..]
$
Works fine. Or....(after killing the one above)
$ net start sshd
The CYGWIN sshd service is starting.
The CYGWIN sshd service was started successfully.
$ cygrunsrv -Q sshd
Service : sshd
Display name : CYGWIN sshd
Current state : Running
Controls Accepted : Stop
Command : /usr/sbin/sshd -D
--
Darren Dunham ddunham@taos.com
Senior Technical Consultant TAOS http://www.taos.com/
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >
-
Re: cannot start sshd on cygwin- win xp
Darren Dunham wrote:
> jameshanley39@yahoo.co.uk wrote:
> > I rebooted the machine and it did not start.
> > On further tests based on the methods you have mentioned..
> >
> > I have since reinstalled cygwin, this time with OpenSSL
> >
> > I found that the strace command, started sshd and sort of occupied
> > the window, did not return me to a shell to enter more commands in
> > that window. Not a problem, I can open another cygwin window.
>
> Let's start slow. Make sure the server works properly before trying
> to turn it into a service.
>
I just tested, you are right, it does start as a server(whether it
works or not I don`t know). (though it doesn`t start or work as a
service yet)
/usr/sbin/sshd <-- starts sshd (shows in netstat)
I can kill it from cygwin or "end task" it from windows.
> When run with no options (no '-d' right?) then it should return
> control in your shell.
>
justing by a test I did. I think when one does
strace /usr/sbin/sshd -x
where x is any letter. It goes to sshd, not to strace, right?
regarding this command
$ strace /usr/sbin/sshd ...
if sshd is not running then
When I run that command with no options,
it still halts similar to -d.
It just halts at a different place.
When I run strace with -d it halts at
330 1341925 [main] sshd 468 select_stuff::wait: m 2, ms 4294967295
When I run it without -d, it halts at
881 2356886 [main] sshd 156 pinfo::exit: Calling ExitProcess n 0x0,
exitcode 0x0
When I say halt, i just mean doesn`t return me to the shell. The server
shows in netstat until sshd is killed.
if i run strace with a wrong switch or when sshd is already running,
then it prints a load of stuff, exits to a shell and does not start a
new sshd, it seems to do nothing. That is the only time strace exits to
a shell. (that, and when i kill sshd from another window)
> Do you see information in your event viewer? When I run sshd I get a
> nice message about sshd: PID XXX: Server listening on 0.0.0.0 port 22.
>
> Anything different for you?
>
I do not see such a nice message.
In Event Viewer..Application
it says sshd . But when I double click it
Event Type: Information
Event Source: sshd
Event Category: None
Event ID: 0
Date: 11/2/2007
Time: 1:12:39 AM
User: MINITOUGH\Current user
Computer: MINITOUGH
Description:
The description for Event ID ( 0 ) in Source ( sshd ) cannot be found.
The local computer may not have the necessary registry information or
message DLL files to display messages from a remote computer. You may
be able to use the /AUXSOURCE= flag to retrieve this description; see
Help and Support for details. The following information is part of the
event: sshd: PID 232: Received signal 15; terminating..
Also,
when I tried to look at the stuff that strace dumped. I saw errors
$ strace /usr/sbin/sshd -D >h
from the h file-----
166 31496 [main] sshd 2796 symlink_info::check: GetFileAttributes
(C:\cygwin
\home\Current user\some disk file) failed
111 31607 [main] sshd 2796 geterrno_from_win_error: windows error 2
== errno
2
152 31759 [main] sshd 2796 symlink_info::check: GetFileAttributes
(C:\cygwin
\home\Current user\some disk file.lnk) failed
111 31870 [main] sshd 2796 geterrno_from_win_error: windows error 2
== errno
2
-------------
I got very similar errors from doing the same thing with -d instead of
-D.
though with -d, ssh dumped some extra info on the screen, as well as
outputting all the other stuff to the h file.
> How about when you try to run it as a service?
>
Current user@minitough ~
$ cygrunsrv -I sshd -p /usr/sbin/sshd
Current user@minitough ~
$ cygrunsrv -S sshd
cygrunsrv: Error starting a service: QueryServiceStatus: Win32 error
1062:
The service has not been started.
It does install as service. It appears in the list of Services shown
by windows. If I run cygrunsrv -I ... when it is already installed I
get an error, but I can remove and install sshd as a service. From the
looks of things, in start..run..services.msc , it installs. Just does
not start.
> > Current user@minitough ~
> > $ net start sshd
> > The sshd service is starting.
> > The sshd service could not be started.
> >
> > The service did not report an error.
> >
> > More help is available by typing NET HELPMSG 3534.
>
> And what does thoat help message display?
>
Current user@minitough ~
$ net helpmsg 3534
The service did not report an error.
> I'm not sure where I found this, but I think that the service runner
> expects that the program it's running will stick around (in other
> words, doesn't create a separate daemon). So I run my ssh with -D
> when I'm invoking as a service, and without it when invoking from a
> shell.
>
> $ /usr/sbin/sshd
> [pause..]
> $
>
> Works fine. Or....(after killing the one above)
>
how do I invoke it as a service using -D ?
$ cygrunsrv -I sshd -p /usr/sbin/sshd -D
cygrunsrv: unknown option -- D
Current user@minitough ~
$ cygrunsrv -I sshd -p /usr/sbin/sshd
Current user@minitough ~
$ cygrunsrv -S sshd -D
cygrunsrv: unknown option -- D
> $ net start sshd
> The CYGWIN sshd service is starting.
> The CYGWIN sshd service was started successfully.
>
> $ cygrunsrv -Q sshd
> Service : sshd
> Display name : CYGWIN sshd
> Current state : Running
> Controls Accepted : Stop
> Command : /usr/sbin/sshd -D
I can`t start my sshd service.
though it does appear to run as a server.
many thanks.
-
Re: cannot start sshd on cygwin- win xp
jameshanley39@yahoo.co.uk wrote:
> how do I invoke it as a service using -D ?
>
> $ cygrunsrv -I sshd -p /usr/sbin/sshd -D
> cygrunsrv: unknown option -- D
This should normally be set up by the ssh-host-config script. Are you
using that? Sorry I didn't mention it earlier. You should use that
initially on the machine for configuring sshd.
Remove your current service and run that again....
Or, you can see from the script that one possibility for setting it up is
if cygrunsrv -I sshd -d "CYGWIN sshd" -p /usr/sbin/sshd -a -D -e "CYGWIN=${_cygwin}" -y tcpip
There the -a specifies arguments to pass to the binary (which in this
case is the '-D' immediately following).
--
Darren Dunham ddunham@taos.com
Senior Technical Consultant TAOS http://www.taos.com/
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >
-
Re: cannot start sshd on cygwin- win xp
Darren Dunham wrote:
> jameshanley39@yahoo.co.uk wrote:
> > how do I invoke it as a service using -D ?
> >
> > $ cygrunsrv -I sshd -p /usr/sbin/sshd -D
> > cygrunsrv: unknown option -- D
>
> This should normally be set up by the ssh-host-config script. Are you
> using that? Sorry I didn't mention it earlier. You should use that
> initially on the machine for configuring sshd.
>
> Remove your current service and run that again....
>
> Or, you can see from the script that one possibility for setting it
> up is
>
> if cygrunsrv -I sshd -d "CYGWIN sshd" -p /usr/sbin/sshd -a -D
> -e "CYGWIN=${_cygwin}" -y tcpip
>
> There the -a specifies arguments to pass to the binary (which in this
> case is the '-D' immediately following).
i`ll look into that. I also got some hits for that error message that
came up in event viewer.
I can leave it at just running it as a server and killing it when
finished. Rather than installing it as a service and starting/stopping
the service.
I still get the error in event viewer even when not installing it as a
service - just running it as a server, but I can connect to openssh`s
sshd . openssh`s ssh connected, as did putty. Though teraterm-ssh
didn`t. Which is fine.
many thanks for your help
--
-
Re: cannot start sshd on cygwin- win xp
On 29 Oct, 00:14, "jameshanle...@yahoo.co.uk"
wrote:
> a selection of all the error message I am getting. Messing around
> trying to start it.
>
> it doesn`t show up on netstat -an. I did install and uninstall a
> windows port of openssh, I don`T know if that messed things up. But
> nothing i easily do about that if it did..
>
> $ cygrunsrv -I sshd -p /usr/sbin/sshd
> cygrunsrv: Error installing a service: OpenService: Win32 error 1073:
> The specified service already exists.
>
> $ net start sshd
> The CYGWIN sshd service is starting.
> The CYGWIN sshd service was started successfully.
>
> Current user@minitough ~
> $ net start sshd
> The CYGWIN sshd service is starting.
> The CYGWIN sshd service was started successfully.
>
> It doesn`t show in netstat. maybe it isn`T menat to ?
>
> $ cygrunsrv --start sshd
> cygrunsrv: Error starting a service: QueryServiceStatus: Win32 error
> 1062:
> The service has not been started.
>
> ..
>
> $ net start sshd
> The CYGWIN sshd service is starting.
> The CYGWIN sshd service could not be started.
>
> The service did not report an error.
>
> More help is available by typing NET HELPMSG 3534.
>
> Current user@minitough /usr/sbin
> $ net stop sshd
> The CYGWIN sshd service is not started.
>
> More help is available by typing NET HELPMSG 3521.
>
> Current user@minitough /usr/sbin
> $ net start sshd
> The CYGWIN sshd service is starting.
> The CYGWIN sshd service was started successfully.
>
> Current user@minitough /usr/sbin
> $ net stop sshd
> The CYGWIN sshd service is not started.
>
> More help is available by typing NET HELPMSG 3521.
>
> .......
> Current user@minitough /
> $ cygrunsrv -S sshd
> cygrunsrv: Error starting a service: QueryServiceStatus: Win32 error
> 1062:
> The service has not been started.
> .....
> Current user@minitough /
> $ cygrunsrv -S /usr/sbin/sshd
> cygrunsrv: Error starting a service: OpenService: Win32 error 123:
> The filename, directory name, or volume label syntax is incorrect.
>
> Current user@minitough /
> $ cygrunsrv -S sshd
>
> Current user@minitough /
> $ ls /usr/sbin/sshd
> /usr/sbin/sshd
You're running MacAfee anti-virus programs, right? They have a nasty
little bit of anti-virus behavior which *cannot* be turned off, at
least the last time I looked, which blockes the SSHD re-exec.
Take a look at this old post about the entirely undocumented '-r'
option to avoid this:
http://www.derkeiler.com/Newsgroups/.../msg00212.html
-
Re: cannot start sshd on cygwin- win xp
Nico wrote:
> On 29 Oct, 00:14, "jameshanle...@yahoo.co.uk"
> wrote:
> > a selection of all the error message I am getting. Messing around
> > trying to start it.
> >
> > it doesn`t show up on netstat -an. I did install and uninstall a
> > windows port of openssh, I don`T know if that messed things up. But
> > nothing i easily do about that if it did..
> >
> > $ cygrunsrv -I sshd -p /usr/sbin/sshd
> > cygrunsrv: Error installing a service: OpenService: Win32 error
> > 1073: The specified service already exists.
> >
> > $ net start sshd
> > The CYGWIN sshd service is starting.
> > The CYGWIN sshd service was started successfully.
> >
> > Current user@minitough ~
> > $ net start sshd
> > The CYGWIN sshd service is starting.
> > The CYGWIN sshd service was started successfully.
> >
> > It doesn`t show in netstat. maybe it isn`T menat to ?
> >
> > $ cygrunsrv --start sshd
> > cygrunsrv: Error starting a service: QueryServiceStatus: Win32
> > error 1062:
> > The service has not been started.
> >
> > ..
> >
> > $ net start sshd
> > The CYGWIN sshd service is starting.
> > The CYGWIN sshd service could not be started.
> >
> > The service did not report an error.
> >
> > More help is available by typing NET HELPMSG 3534.
> >
> > Current user@minitough /usr/sbin
> > $ net stop sshd
> > The CYGWIN sshd service is not started.
> >
> > More help is available by typing NET HELPMSG 3521.
> >
> > Current user@minitough /usr/sbin
> > $ net start sshd
> > The CYGWIN sshd service is starting.
> > The CYGWIN sshd service was started successfully.
> >
> > Current user@minitough /usr/sbin
> > $ net stop sshd
> > The CYGWIN sshd service is not started.
> >
> > More help is available by typing NET HELPMSG 3521.
> >
> > .......
> > Current user@minitough /
> > $ cygrunsrv -S sshd
> > cygrunsrv: Error starting a service: QueryServiceStatus: Win32
> > error 1062:
> > The service has not been started.
> > .....
> > Current user@minitough /
> > $ cygrunsrv -S /usr/sbin/sshd
> > cygrunsrv: Error starting a service: OpenService: Win32 error 123:
> > The filename, directory name, or volume label syntax is incorrect.
> >
> > Current user@minitough /
> > $ cygrunsrv -S sshd
> >
> > Current user@minitough /
> > $ ls /usr/sbin/sshd
> > /usr/sbin/sshd
>
> You're running MacAfee anti-virus programs, right? They have a nasty
> little bit of anti-virus behavior which cannot be turned off, at
> least the last time I looked, which blockes the SSHD re-exec.
>
> Take a look at this old post about the entirely undocumented '-r'
> option to avoid this:
>
> http://www.derkeiler.com/Newsgroups/...06-08/msg00212
> .html
i am not running mcaffee. And would not.
no, your old problem / problem described there, was quite a different
error . where it would not even start from /usr/sbin/sshd , and sshd
-d gave an error " debug1: Server will not fork when running in
debugging mode." I do not get errors from that. My error is after
installing it as a service, starting the service/server(starting the
server through the service) through net start sshd or cygrunsrv -S sshd
excuse my terminology of service and server. I don`t know if it is
correct?