Cygwin ssh works locally, not remotely

cygwincygwin-sshd

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?

Best Answer

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