ssh "permissions are too open" error

ID : 277

viewed : 137

Tags : permissionssshpermissions

Top 5 Answer for ssh "permissions are too open" error

vote vote


Keys need to be only readable by you:

chmod 400 ~/.ssh/id_rsa 

If Keys need to be read-writable by you:

chmod 600 ~/.ssh/id_rsa 

600 appears to be fine as well (in fact better in most cases, because you don't need to change file permissions later to edit it).

The relevant portion from the manpage (man ssh)

 ~/.ssh/id_rsa          Contains the private key for authentication.  These files contain sensitive           data and should be readable by the user but not          accessible by others (read/write/execute).  ssh will simply ignore a private           key file if it is                        accessible by others.  It is possible to specify a          passphrase when generating the key which will be used to encrypt the sensitive           part of this file using 3DES.   ~/.ssh/  ~/.ssh/  ~/.ssh/  ~/.ssh/          Contains the public key for authentication.  These files are not sensitive and           can (but need not) be readable by anyone. 
vote vote


Using Cygwin in Windows 8.1, there is a command need to be run:

chgrp Users ~/.ssh/id_rsa 

Then the solution posted here can be applied, 400 or 600 is OK.

chmod 600 ~/.ssh/id_rsa 

Reference here

vote vote


The locale-independent solution that works on Windows 8.1 is:

chgrp 545 ~/.ssh/id_rsa chmod 600 ~/.ssh/id_rsa 

GID 545 is a special ID that always refers to the 'Users' group, even if you locale uses a different word for Users.

vote vote


I've got the error in my windows 10 so I set permission as the following and it works.

Permission for id_rsa of windows 10

In details, remove other users/groups until it has only 'SYSTEM' and 'Administrators'. Then add your windows login into it with Read permission only.

Note the id_rsa file is under the c:\users\<username> folder.

vote vote


0600 is what mine is set at (and it's working)

Top 3 video Explaining ssh "permissions are too open" error