0

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.

  • 1
    mixing windows and posix path style is NOT a good idea. what is the output of : `A=$(cygpath -u C:\\Users\\me\\.ssh\\id_rsa) ; ls -l $A ; chmod 600 $A ; ls -l $A` – matzeri Jun 01 '20 at 03:53
  • 1
    The main problem is likely `I don't know why .ssh isn't in my home directory, it's odd`. Are you sure that you are using the Cygwin ssh ? – matzeri Jun 01 '20 at 03:57

0 Answers0