Running both a USER and a SYSTEM ssh daemon in Cygwin
Submitted by ross on Mon, 02/16/2004 - 00:45
a "SYSTEM" daemon on port 22, and a "USER" daemon on port with the following:
After making the following changes to /etc/sshd_config:
RSAAuthentication yes UsePrivilegeSeparation noI am able to install and run two sshd daemon's at the same time,
a "SYSTEM" daemon on port 22, and a "USER" daemon on port with the following:
$ sshd_system.sh $ sshd_user.sh -P 23
Here are the scripts: sshd_system.sh and sshd_user.sh.
Unfortunately, if /etc/sshd_config contains:UsePrivilegeSeparation yes
it doesn't work. /var/log/sshd_ross.log shows
Bad owner or mode for /var/emptyThere are two ways to work around this problem: 1. Use a different sshd_config for the USER daemon:
$ sshd_user.sh -P 23 -f $HOME/.ssh/sshd_config
2. Always start the USER daemon with the following script:
#!/bin/sh # sshd_user_restart.sh cygrunsrv --stop sshd_${USER} chown ${USER}.none /var/empty cygrunsrv --start sshd_${USER} chown system.system /var/empty
A zip file contains these scripts and the above readme is available
here.
»
- ross's blog
- Login to post comments