question

AaradhyaChauhan avatar image
0 Votes"
AaradhyaChauhan asked AaradhyaChauhan commented

OpenSSH Server and Authentication agent enabled successfully, but authentication fails when trying to connect

I am using Windows Server 2019 Datacenter. I successfully enabled OpenSSH Server and OpenSSH client from Apps & Features and set both OpenSSH Server and Authentication Agent in services.msc as Automatic Startup and checked if both are running. Even as confirmation, port 22 was open as it runs and was closed as it was stopped. All firewall exceptions were OK. But when I tried to authenticate into it using my mac's terminal, it always said: user ID or password invalid. Even though I knew 100% that both of them are correct. Even RDP was working with the same but ssh refused connection. Sometimes, it gave a weird message in my mac's terminal "ssh listen sock[14]" or something like that. And yes, I also tried removing # from PasswordAuthentication=yes and saved it but nothing happened. Please help me in resolving the issue.

windows-server-2019windows-server-setup
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi,

Please provide more information.

Error Event log:
Applications and Services logs ->OpenSSH

Enable debug logging:
1. Stop the OpenSSH service
2. Open an elevated command prompt and go to the folder where OpenSSH is installed, for example C:\OpenSSH
3. Execute the command C:\OpenSSH\ssdh.exe -ddd
4. The verbose log will be displayed directly in the output

Best Regards,
Eve Wang

0 Votes 0 ·

I'll revert back to you ASAP.

0 Votes 0 ·

1 Answer

MotoX80 avatar image
0 Votes"
MotoX80 answered AaradhyaChauhan commented

What do you have set for allowusers and allowgroups? Enable verbose logging and examine the logs for errors.

openssh_server_configuration




· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

OK. I will revert back here with a log.

0 Votes 0 ·