Crates.io | klucznik |
lib.rs | klucznik |
version | 0.1.2 |
source | src |
created_at | 2022-11-28 20:57:31.991597 |
updated_at | 2022-11-30 18:16:19.966063 |
description | Manage your ssh access keys automatically. |
homepage | |
repository | https://github.com/konradmalik/klucznik |
max_upload_size | |
id | 724762 |
size | 71,919 |
Manage your ssh access keys automatically by for ex. synchronizing them from github.
$ cargo install --locked klucznik
Install the binary to some globally accessible place:
$ sudo install ~/.cargo/bin/klucznik /usr/local/bin/klucznik
authorized_keys
updaterwarning this will overwrite your authorized_keys
file!
Set-up a cron job similar to this:
* 12 * * * /usr/local/bin/klucznik --sources https://github.com/<your username>.keys --destination /home/<user>/.ssh/authorized_keys
You can add more sources via more flags.
Alternatively, use ssh-key-dir to not overwrite your authorized_keys
:
* 12 * * * /usr/local/bin/klucznik --sources https://github.com/<your username>.keys --destination /home/<user>/.ssh/authorized_keys.d/klucznik
Then configure your AuthorizedKeysCommand
in sshd_config
to use ssh-key-dir
to that ssh reads your overlays from that folder.
AuthorizedKeysCommand
(experimental!)Change the following settings in your sshd_config
:
AuthorizedKeysCommand /usr/local/bin/klucznik --sources https://github.com/<username>.keys
AuthorizedKeysCommandUser root
curl
replacement but works'curl
with centralized config'AuthorizedKeysCommand
support (ability to use this instead of ssh-key-dir
.AuthorizedKeysCommand
and no authorized_keys
AuthorizedKeysCommand