Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Can't Get Host Key for Local OpenSSH Server

Thanks for your feedback. I've updated the documentation to explicitly mention that Administrator permissions are needed.
aksarben

Solved the Problem

It occurred to me that file permissions might be the problem. So I closed the command interpreter window, then re-opened it as an administrator, and ran the command again.

This time it worked as advertised.

Thanks for your patience (and documentation!)

Dick Adams
http://www.hymntime.com/tch/
aksarben

Can't Get Host Key for Local OpenSSH Server

I successfully installed & started the OpenSSH server on my PC. I plan to use it for testing/debugging a custom SFTP client.

I followed the steps at https://winscp.net/eng/docs/guide_windows_openssh_server#win10 for "Installing SFTP/SSH server on Windows Using OpenSSH." Things went OK until I reached the step "Finding Host Key." I ran the specified command and got the following error messages:
C:\Users\Dick>for %f in (%ProgramData%\ssh\ssh_host_*_key) do @%WINDIR%\System32\OpenSSH\ssh-keygen.exe -l -f "%f"

ssh-keygen: C:\\ProgramData\\ssh\\ssh_host_dsa_key: Permission denied
ssh-keygen: C:\\ProgramData\\ssh\\ssh_host_ecdsa_key: Permission denied
ssh-keygen: C:\\ProgramData\\ssh\\ssh_host_ed25519_key: Permission denied
ssh-keygen: C:\\ProgramData\\ssh\\ssh_host_rsa_key: Permission denied

I didn't see anything in the instructions on how to set the permissions for these files, though my Windows account DOES have administrator access.

Any help on getting past this step would be greatly appreciated.

My system:
WinSCP Version: 6.1 (Build 13674 2023-5-23)
Microsoft Windows Version: Windows 10 Home, version 22HS, OS build 19045.2965, Windows Feature Experience Pack 1000.19041.1000.0