Professional Documents
Culture Documents
Installing cygwin sshd on a normal machine is pretty straightforward. You simply run ssh-
host-config and walk through the prompts. On a Windows domain it’s more complicated.
Your sshd will still run and you can still connect and run normal commands, but as far as I
can tell there’s no way to elevate your permissions and do admin actions (that would trigger
a UAC prompt if you were using the Windows GUI). To fix this we’ll need to run sshd as a
domain user that has the permissions to setuid like it would on a unix. For some details
check this post by Cygwin project lead Corinna Vinschen.
Under Computer Configuration / Policies / Windows Settings / Security / Local Policies / User
Rights Assignment add your user to the following policy settings
Once the policy is distributed you can install sshd or replace your existing local sshd.
Then delete the local cyg_server user. It’ll only serve to confuse you otherwise.
# some users/groups you've made outside Windows you'll need to take steps
You should be able to see your user in the list of users output by mkpasswd
cyg_server:*:1049696:1049089:U-DMZ\cyg_server,S-1-5-21-10613669-1566996133-358
You can see there that cygwin has mapped a cygwin user cyg_server to the domain user
DMZ\cyg_server . In cygwin, we’ll use just cyg_server to refer to that user. (This is why
it’s important to delete the existing cyg_server user if you already had a local sshd set up).
Run ssh-host-config
sshd has a handy setup script that will walk you through the process. The important options
we want are:
Test it out
If you’ve done everything right, you should be able to connect over ssh with your domain
credentials. Connect with the cygwin user name that maps to your domain account, e.g.
wes , for LAN\wes . Once connected try to sc stop and sc start a service. It should work,
rather than getting a permission failure message, like you would have before.
https://microtechnology-services.github.io/2016/04/29/cygwin-sshd-on-windows-domain.html 2/3
09/12/2021 18:25 Using Cygwin sshd on a Windows Domain
https://microtechnology-services.github.io/2016/04/29/cygwin-sshd-on-windows-domain.html 3/3