Making Cygwin SSH server for Windows

OpenSSH Service on Cygwin allows SSHing into a Windows PC. Thereby, you can securely port forward Windows RDP for graphical remote desktop over SSH.

Consider using Public Key Authentication – it’s far stronger than any human usable keyboard password.

Cygwin SSH server prereq

setup-x86_64 -P openssh

Cygwin SSH server setup

start Cygwin64 using “Run as Administrator” and type


here are some suggested answers to the configuration script questions:

Privilege separation? yes

strict modes? yes

sshd as service? yes

value of CYGWIN for daemon? (just press Enter key, don't type anything)

use a different name? no (you want to use cyg_server)

start Cygwin SSH server

The Cygwin SSH server starts itself on reboot of Windows, but if you need to start it manually (e.g. for the first time upon installing)

cygrunsrv -S sshd

testing Cygwin SSH server

  • login to your Windows Cygwin SSH server from another PC.
  • Under services.msc you should see the Status “started” for service “CYGWIN sshd”, and under the General tab the “path to executable” should be something like c:\cygwin64\bin\cygrunsrv.exe

configure Cygwin SSH server

 nano /etc/sshd_config

to make the changes take effect, type

 cygrunsrv -E sshd
 cygrunsrv -S sshd

If you get

system error 1069 has occurred. The service did not start due to a logon failure

check the password on your “privileged server” cyg_server – maybe you typed it wrong.

Tags: ,