27 lines
No EOL
932 B
Markdown
27 lines
No EOL
932 B
Markdown
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)
|
|
|