I'm using Windows 10 OpenSSH version. After update to Windows 1809 I've got

C:\Windows\System32\OpenSSH\ssh.exe myhost
Bad owner or permissions on C:\\Users\\XXX/.ssh/config

But execution

c:\Windows.old\Windows\System32\OpenSSH\ssh.exe myhost

is successful.

Versions are slightly different

C:\Windows.old\Windows\System32\OpenSSH\ssh.exe -V
OpenSSH_for_Windows_7.6p1, LibreSSL 2.6.5
C:\Windows\System32\OpenSSH\ssh.exe -V
OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5

I've tried to 'cleanup' permissions like described but it doesn't help.

migrated from serverfault.com Oct 5 '18 at 9:42

This question came from our site for system and network administrators.

  • I have everything in place and owner and file permissions are the same. I find out a kind of workaround: uninstall OpenSSH build and using ssh build included in latest git-for-windows installation – Dmitry Ezhov Oct 5 '18 at 19:50
  • Take a look at Cygwin sshd vs Microsoft sshd on the Cygwin mailing list; and sshd issues on Windows 10 version 1803 on the Sourceware mailing list. It looks like the fix is in the works, but the author says it may take a couple of weeks. – jww Oct 5 '18 at 20:41

I had a similar issue and fixed it by changing file's DACL (permissions) by removing inheritance and leaving only the user, SYSTEM and Administrators to have Full control access:

icacls C:\Users\xxx\.ssh\config
C:\Users\xxx\.ssh\config NT AUTHORITY\SYSTEM:(I)(F)

I used explorer's GUI for that, but it can be done by icacls as well. Example:

> icacls.exe .\.ssh\config /grant everyone:f 
> ssh
Bad owner or permissions on C:\\Users\\xxx/.ssh/config
> icacls.exe .\.ssh\config /inheritance:d
> icacls.exe .\.ssh\config /remove everyone
> ssh
Warning: Permanently added '' (ECDSA) to the list of known hosts.
xxx@'s password:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.