5

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?

JasonGenX
  • 532

4 Answers4

5

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
Daniel t.
  • 9,619
3

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.

Robert
  • 31
2

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.

slm
  • 8,010
someguy
  • 29
0

mine worked only after I used as name what is write in /etc/passwd

and it was something like COMPUTERNAME+Administrator

really strange that locally works without COMPUTERNAME+