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

Aaradhya Chauhan 111 Reputation points
2020-10-03T13:22:56.333+00:00

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,451 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.
241 questions
{count} votes

1 answer

Sort by: Most helpful
  1. MotoX80 31,571 Reputation points
    2020-10-04T15:40:16.187+00:00

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

    openssh_server_configuration