Using Cygwin in Windows 10, chmod 600 does not work as expected?

ssh says:

Load key "C:\\Users\\me/.ssh/id_rsa": bad permissions
debug1: Trying private key: C:\\Users\\me/.ssh/id_dsa

So I try to fix the permissions using chmod 600 as is very standard on Linux systems:

me@DESKTOP-B7QCL2A /cygdrive/c/Users/me/.ssh
$ chmod 600 C:\\Users\\me/.ssh/id_rsa

But it does not work. ssh still reports bad permissions. Indeed, it seems that the chmod 600 command did nothing:

me@DESKTOP-B7QCL2A /cygdrive/c/Users/me/.ssh
$ ls -l C:\\Users\\me/.ssh/id_rsa
-rw-r--r-- 1 me me 887 May 31 18:58 'C:\Users\me/.ssh/id_rsa'

I mean sometimes it works, if the file is in the home directory. I don't know why .ssh isn't in my home directory, it's odd, but let's not change the ssh configuration because I haven't touched it, just trying to add a private key file. Let's figure out how to fix permissions.

I tried all kinds of hacks suggested here, the setfacl, and the chgrp, none of it works.

2 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like