Categories: Development

Bad owner or permissions on .ssh/config

This article helps to solve a Bad owner or permissions on .ssh/config issue occurring on a Windows 10 machine when using a terminal emulator like cmder.

Using cmder on a Windows 10 development machine, I noticed issues after I recently added a new user account to the system. It caused permission issues due to the way inheritance of ownership was being handled.

Resolve ‘Bad Owner or Permission on .ssh/config’ issues on Windows 10

To resolve, I did the following to fix up the permission issues that cause a `Bad owner or permissions on C:\\Users\\Peter/.ssh/config` from occurring each time I tried to connect to a remote host within cmder:

Fixing the ‘Bad owner or permissions on .ssh/config’ Issue

Follow these steps in the Windows 10 GUI to resolve the permission issues:

  1. Locate your .ssh folder. It is usually located in C:\Users\ e.g. C:\Users\Peter.
  2. Go to this location with Windows Explorer.
  3. Right click the .ssh folder and click ‘Properties’.
  4. Find and click the ‘Security’ tab.
  5. Then click ‘Advanced’.
  6. Click ‘Disable Inheritance’, click OK.
  7. A warning popup will appear. Click ‘Remove all inherited permissions from this object’.

    Disable Inherited permissions on Windows 10 for a folder.

  8. Click ‘OK’ to close the ‘Advanced Security Settings for .ssh’ window.
  9. You will notice that all users will be removed. Let’s add the owner back. On the same window, click the ‘Edit’ button.
  10. Next, click ‘Add’ to bring up the Select Users or Groups window.
  11. Click ‘Advanced’, then click the ‘Find Now’ button. A list of user results should appear.
  12. Select your user account. In my case, I selected user ‘Peter’.
  13. Then click OK (approximately three times) to close all windows.

Once all that is done, close and open the cmder app again and attempt to connect to a remote SSH host. Hopefully your set up is fixed and the ‘Bad owner or permissions on .ssh/config’ error prompt is gone.

Peter Tran

Share
Published by
Peter Tran

Recent Posts

Kubernetes Resources to Learn From

I have been fortunate in working a lot more with Kubernetes lately over the last few months so I've been…

1 year ago

WordPress Development using Docker

Building my portfolio site, I thought I'd show you how I set up my Wordpress development using Docker. Given the…

1 year ago

Blank images in Puppeteer screenshots solved!

Frustrated with getting blank images in Puppeteer Chrome screenshots, recently I was in a situation where I needed to migrate…

1 year ago

Plans Moving Forward – The Revamped Web and I

It has been six year since my last major revamp/redesign of my current petertran.com.au portfolio site. So what are my…

1 year ago

Accept payments easily and effortlessly with Pin Payments integration

Only a few lines of code required is to implement a payment system, thanks to inline Pin Payments integration. Accepting…

6 years ago

Move your VirtualBox virtual machine (VM) image/images to another location or drive

Here is a relatively easy way to move your VirtualBox virtual machine (VM) images to another location or drive: Shutdown all…

6 years ago