cygwin ssh works locally, not remotely

I have Cygwin with SSH server installed (Windows 7). After setting up I can login locally using "ssh localhost -l [myUsername]". I input my password. Success.

However, trying to SSH to the machine remotely from a different machine connects, but ALWAYS rejects the password with "permission Denied". There is no connectivity problem, obviously I'm connecting. Firewall settings are all OFF.

Why is that happening?


Run the following commands, after taking a backup of the files, and then restart the ssh service.

mkpasswd -l > /etc/passwd

mkgroup -l > /etc/group

edit sshd_config and ensure the following is set:

ListenAddress 0.0.0.0

save the file and restart sshd. This will force the sshd daemon to listen on all network interfaces.


I had the same problem and I spend a few hours trying to solve it. But solution is very simple. Problem lie in user name. If you login locally Windows is not case sensitive. But if you login "remotely" you have to take care of it. You must write user name exactly how it was defined in Windows.