This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Win2003 server and cron/sshd as services (1.5.19)

> I've been having problems getting cron/sshd to work properly (as
> services or not as services) on a Win 2003 server.  I understand that
> certain attributes of the SYSTEM account changed in win2003, and I've 
> tried to allow ssh-host-config to setup sshd, but with no success.  I
> have tried setting up both sshd and cron manually (following relevant 
> win2003 advice from, but I still
> cannot seem to get either service to work properly.

Have you stopped and started the ssh service several times?  If so,
have you remembered to provide the password that that 'ssh-host-config'
requires you to create?  It would be helpful in diagnosing your problem
if you were to provide the text of your commands for starting and
the ssh service.

Here is an edited copy of the command that I have put into a wrapper
script to start the ssh service.  I am running sshd on several computers
running W2003.  I have edited out the password that I use.  See the
cygrunsrv documentation for a description of its options.


# Stop if any errors occur.
set -o errexit;

# If there is a running service, then stop it and remove it.
cygrunsrv --query sshd > /dev/null 2>&1 && {
        cygrunsrv --stop $service;
        cygrunsrv --remove $service;

# Install the sshd service.
cygrunsrv --install sshd --shutdown --path /usr/sbin/sshd --args "-D" \
    --disp "Cygwin sshd" --desc "Cygwin Openssh service" \
    --user sshd_server --passwd "your_fine_password" \
    --env "CYGWIN=binmode ntsec tty";

# Start the sshd service.
cygrunsrv --start sshd;

# === End of === #

Of course, since 'your_fine_password' is provided in clear text, you'll
want to keep this script protected, or maybe change the script to
prompt you for the password.

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]