Bad owner or permissions on ‘.ssh/config’ [SOLVED]

Starting from Windows 10 build 1809, Windows has a native SSH client that is based on the OpenSSH port.

If you try to connect to some host from a Windows command-line prompt (CMD) or PowerShell using the ssh command, you may receive the error as follows:

Bad owner or permissions on C:\\Users\\<username>/.ssh/config

This short note shows how to fix the permissions on all the files under the C:\\Users\\<username>/.ssh folder.

Bad owner or permissions on ‘.ssh/config’

Right-click on the .ssh folder and select “Properties“.

Go to the “Security” tab and click on “Advanced“:

Click on “Disable inheritance“:

Choose the option “Remove all inherited permissions permissions from this object“:

Remove all users and groups except SYSTEM and your user, check the box “Replace all child object permission entries with inheritable permission entries from this object” and click on “OK“:

The correct owners and permissions on the C:\\Users\\<username>/.ssh folder should look like this:

The “Bad owner or permissions on C:\\Users\\<username>/.ssh/config” error should be resolved now and you should be able run the ssh command without any issues.

One Reply to “Bad owner or permissions on ‘.ssh/config’ [SOLVED]”

  1. Thanks a lot !

Leave a Reply