I'm trying to connect to Amazon EC2 using OpenSSH in windows but I need to set the permissions of my key file.
What is the windows equivalent of CHMOD 600
?
I've googled extensively and found only blogspam.
EDIT: Windows 7, using DOS.
I'm trying to connect to Amazon EC2 using OpenSSH in windows but I need to set the permissions of my key file.
What is the windows equivalent of CHMOD 600
?
I've googled extensively and found only blogspam.
EDIT: Windows 7, using DOS.
Modify the permissions so that:
Now scp will read permissions 0400 and will be happy. Ish.
I've go same issue. The solution, which worked was to set compatibility mode of ssh.exe to Windows XP SP3.
For unix & OSX
Quite simply:
For Windows
If the file is a windows (NTFS) symbolic link, the above won't work. You need to make it a regular file. I am not sure why.
If you don't have openssh or cygwin, use chocolatey to install it easily using chocolatey.
Open Cygwin Terminal that was installed with chocolatey and run (note that
ssh-keygen
creates new keys):Verify keys are there (or replace them with the keys you want), and then in Cygwin shell:
Or for the rare case that you're using (and generated the keys from) chocolatey's SSH package:
I ran into the same problem on windows 10. I fixed it by adding my user and granting the Modify, Read & execute, Read and write permissions. I removed all other users. Here is what it looks like after removing all other permissions:
Today one of the recommended ways on Windows would be to use PowerShell and the
Get-Acl
andSet-Acl
Cmdlets.Here's an example to ensure that only the current user has permission to a folder and all files in it - similar to what is recommended for the
.ssh
folder in Unix/Linux/OS X:For more details see
Not really answering the same question but I was able to connect to EC2 using these instructions:
SSH to EC2 linux instance from Windows