Can't add private key in VS Code Terminal To SSH To Remote Server

My host requires SSH connections be made using a private key. I’m using VS Code’s bash terminal on Windows 10, and I’m trying to add the private key using ssh-add, but I get the message, “Permissions 0444 for ‘jd-rsa’ are too open. It is required that your private key files are NOT accessible by others. This private key will be ignored.” I’ve removed permissions for group and other and left my user only read access, but when the Windows permissions are translated to Linux ones, it’s ending up as 444, and the key is ignored. I get that Windows and Linux permissions are different, but is there a solution for this so I can SSH into my server from the terminal within VS Code? I do have Windows Subsystem For Linux activated if that would open any possible solutions?

Remove access from everyone except yourself (give yourself Full Control, obviously). Make sure you’re the Owner, and disable Inheritance. See if that works.

I appreciate the reply. Yes, that is what I have done, but when I view the file permissions from withing the terminal in VS Code, they are listed as -r–r–r–. For some reason, even though I have given access only to my user from the Windows side and disabled inheritance, bash/linux is seeing it as -r–r–r–. I can access using putty, I’d just have preferred to be able to from within VS Code.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.