As the title says, when I run sshd
from the command line (C:\Windows\OpenSSH\sshd.exe
) my passwordless login to localhost
works flawlessly, but if I run it as a service (double checked the path and it's the same as above) I get no error from the service that I can tell but connecting to it gives this error:
Connection reset by 127.0.0.1 port 22
The authentication agent isn't active either as a service or started from the command line at all, the public keys should be copied correctly (again, connecting to the command line sshd
works) and OpenSSH is installed from the optional features of an up to date Windows 10 installation.
Maybe the permissions to the ssh key files are wrong? The service seems to be set to run as "local service", whatever that is, do I need to figure out the actual user name and give it full control over C:\ProgramData\ssh
or something?
Here's the tail end of the fail log when trying to connect to service sshd
:
debug1: Authentication succeeded (publickey).
Authenticated to localhost ([127.0.0.1]:22).
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug3: send packet: type 90
debug1: Requesting [email protected]
debug3: send packet: type 80
debug1: Entering interactive session.
debug1: pledge: network
debug1: console supports the ansi parsing
debug3: Successfully set console output code page from:437 to 65001
debug3: Successfully set console input code page from:437 to 65001
debug3: recv - from CB ERROR:10054, io:0000016F1866FEE0
debug3: send packet: type 1
debug3: send - WSASend() ERROR:10054, io:0000016F1866FEE0
Connection reset by 127.0.0.1 port 22
debug3: Successfully set console output code page from 65001 to 437
debug3: Successfully set console input code page from 65001 to 437
As you can see, the authentication succeeds, then something happens and the connection is refused.