DeutschEspañolFrançaisItalianoNederlandsPortuguêsΕλληνικάРусскийالعربية中文(简体)中文(繁體)日本語한국어
 
Donate Bitcoins
Google
 
www smithii.com
 

Running both a USER and a SYSTEM ssh daemon in Cygwin

After making the following changes to /etc/sshd_config:

RSAAuthentication yes
UsePrivilegeSeparation no

I 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/empty

There 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.

DeutschEspañolFrançaisItalianoNederlandsPortuguêsΕλληνικάРусскийالعربية中文(简体)中文(繁體)日本語한국어
 
Donate Bitcoins
Google
 
www smithii.com
 
Special thanks to Riester Rente Online for a generous donation!