When I was installing Cygwin under Windows 2012 I met trouble with connecting to SSH-server. Every time I tried to connect to server via SSH I got messages "Operation not permitted" and "Connection closed".
That problem was because Windows 2012 as Windows 7 and Vista has UAC (User Account Control). So special account (cyg_server) hasn't enough rights to utilize SSH-server.
The solution is to give some more rights: SeAssignPrimaryTokenPrivilege, SeCreateTokenPrivilege, SeTcbPrivilege, and SeServiceLogonRight.
List of current token rights can be got with command:
By next commands you can add missing rights:
That problem was because Windows 2012 as Windows 7 and Vista has UAC (User Account Control). So special account (cyg_server) hasn't enough rights to utilize SSH-server.
The solution is to give some more rights: SeAssignPrimaryTokenPrivilege, SeCreateTokenPrivilege, SeTcbPrivilege, and SeServiceLogonRight.
List of current token rights can be got with command:
editrights -l -u cyg_server
By next commands you can add missing rights:
editrights -a SeAssignPrimaryTokenPrivilege -u cyg_server
editrights -a SeCreateTokenPrivilege -u cyg_server
editrights -a SeTcbPrivilege -u cyg_server
editrights -a SeServiceLogonRight