You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updated docs/content/authentication/troubleshooting-ssh/error-permission-denied-publickey.md with steps to verify local ssh permissions. Changes only include additions; nothing removed.
Copy file name to clipboardExpand all lines: content/authentication/troubleshooting-ssh/error-permission-denied-publickey.md
+107Lines changed: 107 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -246,3 +246,110 @@ If you don't see your public key in {% data variables.product.github %}, you'll
246
246
247
247
> [!WARNING]
248
248
> If you see an SSH key you're not familiar with on {% data variables.product.github %}, delete it immediately and contact {% data variables.contact.contact_support %} for further help. An unidentified public key may indicate a possible security concern. For more information, see [AUTOTITLE](/authentication/keeping-your-account-and-data-secure/reviewing-your-ssh-keys).
249
+
250
+
251
+
## Verify local SSH permissions
252
+
253
+
{% mac %}
254
+
255
+
1. Open Terminal.
256
+
1. Start SSH agent in the background.
257
+
258
+
```shell
259
+
$ eval "$(ssh-agent -s)"
260
+
> Agent pid 59566 # Example output
261
+
```
262
+
263
+
1. Reattempt to add the appropriate SSH key to the authentication agent. If there is a problem with permissions, the return will specify this.
264
+
265
+
```shell
266
+
$ ssh-add ~/ssh-directory/<keyfile>
267
+
> Permissions 0604 for '/ssh-directory/<keyfile>' are too open. It is required that your private key files are NOT accessible by others. This private key will be ignored.
268
+
```
269
+
270
+
1. This may be fixed with the `chmod` command.
271
+
272
+
```shell
273
+
$ chmod 700 /ssh-directory
274
+
$ chmod 600 /ssh-directory/*
275
+
$ chmod 644 /ssh-directory/*.pub
276
+
```
277
+
278
+
1. After setting permissions, reattempt to add the keyfile. An `Identity added` message indicates success.
1. Reattempt to add the appropriate SSH key to the authentication agent. If there is a problem with permissions, the return will specify this.
298
+
299
+
```shell
300
+
$ ssh-add ~/ssh-directory/<keyfile>
301
+
> Permissions 0604 for '/ssh-directory/<keyfile>' are too open. It is required that your private key files are NOT accessible by others. This private key will be ignored.
302
+
```
303
+
304
+
1. This may be fixed with the `chmod` command.
305
+
306
+
```shell
307
+
$ chmod 700 /ssh-directory
308
+
$ chmod 600 /ssh-directory/*
309
+
$ chmod 644 /ssh-directory/*.pub
310
+
```
311
+
312
+
1. After setting permissions, reattempt to add the keyfile. An `Identity added` message indicates success.
1. Reattempt to add the appropriate SSH key to the authentication agent. If there is a problem with permissions, the return will specify this.
332
+
333
+
```shell
334
+
$ ssh-add ~/ssh-directory/<keyfile>
335
+
> Permissions 0604 for '/ssh-directory/<keyfile>' are too open. It is required that your private key files are NOT accessible by others. This private key will be ignored.
336
+
```
337
+
338
+
1. This may be fixed with the `chmod` command.
339
+
340
+
```shell
341
+
$ chmod 700 /ssh-directory
342
+
$ chmod 600 /ssh-directory/*
343
+
$ chmod 644 /ssh-directory/*.pub
344
+
```
345
+
346
+
1. After setting permissions, reattempt to add the keyfile. An `Identity added` message indicates success.
0 commit comments