This commit is contained in:
nm1 2026-11-04 00:33:23 +05:30
commit 74ae93a96e

View file

@ -0,0 +1,27 @@
Multi account with ssh keys on a device
https://www.techaddressed.com/tutorials/add-verify-ssh-keys-gitea/
- Linux
The permissions have to be set like this
This means that the permissions on that file are also set incorrectly, and can be adjusted with this:
`sudo chmod 644 ~/.ssh/known_hosts` : it means read and write for user and read for group and others
Finally, you may need to adjust the directory permissions as well:
`sudo chmod 755 ~/.ssh` : it means read,write,execute for user, read,execute for group and others
This should get you back up and running.
 
The keys need to be read-writable only by you:
`chmod 600 ~/.ssh/id_rsa`
Alternatively, the keys can be only readable by you (this also blocks your write access):
`chmod 400 ~/.ssh/id_rsa`
600 appears to be better in most cases, because you don't need to change file permissions later to edit it. (See the comments for more nuances)