Unable to start sshd on Windows 11, ssh_rsa_host_key access problem #2185
-
I have been trying to install the OpenSSH server on a Windows 11 machine. I am following the instructions on here (https://github.com/PowerShell/Win32-OpenSSH/wiki/Install-Win32-OpenSSH-Using-MSI) and https://github.com/PowerShell/Win32-OpenSSH/wiki/Troubleshooting-Steps for troubleshooting - but things start to go wrong at a very early stage. I suspect I'm having multiple problems really. I have also installed OpenSSH on another machine, Windows 10, and it seems to run cleanly there, so I went to compare the debug logs to see where things start to diverge, although the versions are different (OpenSSH 8.6 on Win10, 9.4 on Win11, but I don't think that's the issue). First of all, I go in debug mode and manual startup because when I try to start sshd as a windows service with net start I get either an error message that the service is starting or terminating, or, when it does try to boot up, it says that the service cannot be started (together with a NET HELPMSG 3523, no useful information there). When I start it through Windows' control panel, it just keeps restarting in an endless loop. I don't find any log anywhere when I do this.
Then the log goes on and it does go to a point where it is listening to port 22. When I try to login on localhost afterwards, I get other problems, but I would like to start with the apparently problematic access. I would try to delete the host rsa key but even as Administrator I do not have the right permissions (nor am I the owner, I don't know what is) to remove or change it. I don't have this problem on Win10, but I didn't run the file permissions script. So how do I fix the ssh_rsa_host_key, for starters? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Can you confirm that you are running sshd as an admin or system? If you are not running as an admin in debug mode it explains why you are unable to load the keys. If you are running as a standard user, then it is expected that you are unable load the keys. If you are still having issues, take a look at the solution in this issue: #2161 |
Beta Was this translation helpful? Give feedback.
Can you confirm that you are running sshd as an admin or system? If you are not running as an admin in debug mode it explains why you are unable to load the keys. If you are running as a standard user, then it is expected that you are unable load the keys.
If you are still having issues, take a look at the solution in this issue: #2161