2

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

 1 year ago
source link: https://www.shellhacks.com/bad-owner-or-permissions-on-ssh-config-solved/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

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 (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“:

xssh_folder_properties.png.pagespeed.ic.sZZlARa4_v.png

Click on “Disable inheritance“:

xssh_folder_properties_advanced_disable_inheritance.png.pagespeed.ic.W6oC1TQNMV.png

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

xssh_folder_properties_advanced_disable_inheritance_remove_all.png.pagespeed.ic.eCKXS2I35T.png

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“:

xssh_folder_properties_advanced_remove_users.png.pagespeed.ic.tg0ipedY5w.png

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

xssh_folder_properties_advanced_correct_settings.png.pagespeed.ic.RnomEgaqvK.png

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.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK