Bad owner or permissions on ‘.ssh/config’ [SOLVED]
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.
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“:
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.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK