- 1 year ago
Windows 10 OpenSSH authorized keys error with sshd
Comment
1 / 1
If you are encountering an error with OpenSSH on Windows 10 related to authorized keys, you can try the following steps to troubleshoot and resolve the issue:
Ensure correct file permissions:
- Navigate to the directory where your authorized keys file is located. By default, it is usually
C:\Users\<your_username>\.ssh
. - Right-click on the
authorized_keys
file and select "Properties". - Go to the "Security" tab and make sure that the current user has read permissions on the file. If not, click on "Edit" and grant the necessary permissions.
- Navigate to the directory where your authorized keys file is located. By default, it is usually
Verify the authorized keys file format:
- Open the
authorized_keys
file using a text editor and ensure that each public key is on a separate line. - Check that there are no additional characters or formatting issues within the file.
- Open the
Restart the SSH server service:
- Open the Services management console by pressing Win + R, typing
services.msc
, and hitting Enter. - Locate the "OpenSSH SSH Server" service in the list.
- Right-click on the service and select "Restart" or "Stop" followed by "Start".
- Open the Services management console by pressing Win + R, typing
Enable verbose logging for troubleshooting:
- Open the
sshd_config
file located atC:\ProgramData\ssh
. - Uncomment the line
#LogLevel INFO
by removing the#
at the beginning. - Save the file and restart the SSH server service.
- Check the
sshd
logs located atC:\ProgramData\ssh\Logs
for any errors or detailed information.
- Open the
Review Windows Event Viewer:
- Open the Event Viewer by pressing Win + R, typing
eventvwr.msc
, and hitting Enter. - Navigate to "Windows Logs" -> "Application".
- Look for any error messages related to the OpenSSH server and investigate further.
- Open the Event Viewer by pressing Win + R, typing
If the issue persists, it may be helpful to provide more specific error messages or log entries for further assistance. You can consult the official OpenSSH documentation or seek support from the OpenSSH community for more detailed troubleshooting steps or known issues specific to your setup.