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?

4 Answers 4

4

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
0
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.

1
  • first good answer ... Nov 3, 2023 at 12:23
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.

3
  • no effect. still permission denied from any remote machine. and I did stop/start sshd
    – JasonGenX
    Jan 30, 2013 at 19:23
  • Shouldn't you just remove the line all together? Or is that the same thing? Jan 30, 2013 at 20:56
  • 1
    It's worth mentioning that you have to open port 22 through the Windows firewall of choice to make sure the port is forwarded. Jun 8, 2017 at 23:44
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+

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .