C-NET :: PROJECTS

cat cygwin-auto-started-sshd-service-as-single-user-on-windows-8.md

Cygwin auto started sshd service as single user on Windows 8

Posted
Updated
Filed under
Windows · Reference

On a single user desktop, you might want to run cygwin sshd autostarted as a specific user, without privilege separation. Here's a short reference:

  1. Disable UAC
  2. Open a Cygwin terminal
  3. ssh-host-config
  4. Select "no" on privilege separation
  5. Enter nothing, [], as the value of CYGWIN for the daemon
  6. Select "yes" to use a different username than cyg_server
  7. Enter your username, twice
  8. Enter your password, twice
  9. Edit (with your favorite editor) /etc/sshd_config
  10. Edit the UsePrivilegeSeparation line to say UsePrivilegeSeparation no (why the hell didn't step 4 do this?)
  11. Go to the windows firewall settings (just type "firewall" into the start menu search - look under "settings")
  12. Go to "advanced settings"
  13. Go to "Inbound rules"
  14. Add a new rule
  15. Select "Port"
  16. Select "TCP" and enter "22" as the specific local port
  17. Select "Allow the connection"
  18. Select when to apply the rule (default all cases)
  19. Give it a name, like "SSH"
  20. Reboot

If you later change your password, you will have to start services.msc, find the Cygwin ssh service and change your credentials on it as well.

Comments