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

Aaradhya Chauhan 111 Reputation points

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 2019
Windows Server 2019
A Microsoft server operating system that supports enterprise-level management updated to data storage.
3,341 questions
Windows Server Setup
Windows Server Setup
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
234 questions
{count} votes

1 answer

Sort by: Most helpful
  1. MotoX80 30,916 Reputation points

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