Mail Archives: cygwin/2008/01/31/10:20:49
Jason has hit the high points but I thought I'd reply to fill in a few other
areas.
jrtayloriv wrote:
> Sorry, I am not used to Windows at all -- I've only been using Linux for the
> past several years and I've forgotten about a lot of things.
Then you should feel at home in Cygwin. The concepts are very close in most
regards.
> Because of this, it seems that I am having trouble asking the right
> question...
>
> I am talking about how to get Cygwin itself to run in the background. Once I
> start up the Cygwin shell, I am able to run SSH as a background service
> within Cygwin. But when I close the Cygwin shell, I loose the SSH server
> running within it.
>
> What I need is information on how to run ***CYGWIN*** as a background
> service, so that there is no Cygwin window open, but the services that are
> running in Cygwin (in this case sshd) are still there. Do I even need to run
> Cygwin for this? Can I just run cygwin's sshd from windows?
I think Jason has covered this. You are actually not running the SSH server
as a service at all. Running it in the background is not the same as
running it as a service, as you have noticed. Also, since you have been
running it directly from the command-line, you have now set ownership and
permissions on various files and directories the SSH server uses. These are
now tuned for the user you ran it as. This means three things:
1. You won't be able to run the SSH server as a service under any other
user without resetting all these files/directories.
2. Since 'ssh-host-config' is set up to create a service for the SSH
server using the SYSTEM or sshd-server user, you may find that running
this configuration script no longer gets you a working SSH server
service (see 1).
3. While it is possible and permissible to run the SSH server as a service
under any user, you loose the ability to login with public key
authentication as any user other than the one the service is running
under.
Depending on how important this ability is and how willing you are to look
through the archives for recipes on how to reset permissions and owners on
these files and directories, you may find it preferable to just wipe Cygwin
from your system and re-install. You can then use the supplied scripts to
quickly and easily configure your SSH server the way you want. Again, the
openssh readme that a number of people have pointed you to is good and
important reading for you, as well as the Cygwin Users Guide.
> I do know what the 'Run' menu is in Windows. I also found information about
> Cygserver in the online documentation -- is this what I need? Are you trying
> to tell me to use the Run menu with 'cygrunsrv.exe' ? Or are you telling me
> to run sshd from 'Run' menu?
No, not at all. I was referring to '/usr/bin/run' which hides the console
of console apps when run directly from the Windows Explorer, for example.
'cygrunsrv' is similar to 'service' under Linux. It allows you to start,
stop, install, and remove services, among other things. 'ssh-host-config'
uses it.
--
Larry Hall http://www.rfk.com
RFK Partners, Inc. (508) 893-9779 - RFK Office
216 Dalton Rd. (508) 893-9889 - FAX
Holliston, MA 01746
_____________________________________________________________________
A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -