In some cases the ssh connection for a local user fails when the Windows client machine configured to connect to a domain server. The connection test in a Cygwin console does not work.
By default, the "passwd" file created by Cygwin when we sync the local users with command "mkpasswd --local > /etc/passwd" includes the machine name in front of the userID. With that setting the authentication tries to connect to the domain controller for the authentication.
It is required to modify the <cygwin-Install>/etc/passwd file and remove the "<machine name>+" for the local user account.
e.g., Edit "c:\cygwin64\etc\passwd" file and modify the record for the local user From:
Note: It is not required to restart the Cygwin service after you have modified the passwd file. To test the connection, execute command "ssh -l <userID> <machine>" in the Cygwin console.
Issue/Introduction
Windows Cygwin ssh connection for a local user failed with error (permission denied)