The installation is straight forward. The important thing is to make sure to select the openssh and openssl package during the installation.
update the C:\cygwin\Cygwin.bat with below content.
set CYGWIN=binmode ntsec
bash --login -i
create sshd service
After the sshd service is created, startup the service
Now, after the sshd service is started, we can test the ssh.
Fix the permission denied error
When I am testing the ssh from linux to windows, I get the permission denied error even the password is correct.
The issue is the cygwin does not write the password into the /etc/password properly. We have to manually run the mkpasswd.exe again.
mkpasswd.exe -l > /etc/passwd
After that, I can ssh from linux to windows successfully.