CDIST-TYPE__SSH_AUTHORIZED_KEY(7)
π cdist-type__ssh_authorized_key(7) π
okay bestie, so this is a cdist type page, and no bc it's not in the normal section 1, it's section 7, iykyk. anyway. we're talking about cdist-type__ssh_authorized_key and it does exactly one (1) thing: it manages a single ssh authorized key entry. that's it. one entry. one. π
β¨ NAME β¨
cdist-type__ssh_authorized_key β manage a single ssh authorized key entry, bestie. just the one. π
πΈ DESCRIPTION πΈ
so like, this type manages one authorized key entry in an authorized_key file. literally one. don't come at it asking for more, it's not that kind of type. π
and the whole reason it exists? it was created to be used by the __ssh_authorized_keys type. it's the little helper guy. the supporting character. the bestie behind the bestie. π«Ά
π REQUIRED PARAMETERS π
these are not optional, queen. you need them.
fileβ the authorized_keys file where the given key should be managed. that's the whole vibe, it needs a home.keyβ the ssh key which shall be managed in this authorized_keys file. and listen, it must be a string containing the ssh keytype, the base 64 encoded key, and an optional trailing comment which shall be added to the given authorized_keys file. so like, all three parts, okay? no shortcuts. β
β¨ OPTIONAL PARAMETERS β¨
these ones are the ~extra credit~, the accessories to the outfit:
commentβ use this comment instead of the one which may be trailing in the key. like, if you wanna override the built-in one, go off.optionβ an option to set for this authorized_key entry. and the slay part? it can be specified multiple times. seesshd(8)for available options. stack them like bracelets. πstateβ if the managed key should be'present'or'absent'. defaults to'present'. so if you don't say anything, the key is staying. main character energy. π
π MESSAGES π
this type is chatty, and here's what it says:
added to file (entry)β the key entry (with optional comment) was added to file. πremoved from file (entry)β the key entry (with optional comment) was removed from file. π
π¦ EXAMPLES π¦
okay here's the tea, watch closely:
__ssh_authorized_key some-id \
--file "/home/user/.ssh/autorized_keys" \
--key "$(cat ~/.ssh/id_rsa.pub)"
and then the β¨glow upβ¨ version with options and a comment:
__ssh_authorized_key some-id \
--file "/home/user/.ssh/autorized_keys" \
--key "$(cat ~/.ssh/id_rsa.pub)" \
--option 'command="/path/to/script"' \
--option 'environment="FOO=bar"' \
--comment 'one to rule them all'
ngl bestie, yes, it really does say autorized_keys in the examples up there. we are copying it character for character because that's the rule and i do not make the rules. π
π SEE ALSO π
go read those too, they're the friend group. πΈ
π AUTHORS π
Steven Armstrong <steven-cdist--@--armstrong.cc> β the icon who made this. periodt. π
π COPYING π
Copyright (C) 2014 Steven Armstrong. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. fr fr, that's the actual legal text, i'm not paraphrasing the license, that would be unhinged. π«Ά
π« COPYRIGHT π«
ungleich GmbH 2021 β okay so that's the copyright line, and version 7.0.0 from Jul 31, 2022 is the vibe check date on this whole page. that's a wrap bestie, go manage exactly one key, mwah πβ¨π
π¦ where this page comes from
- fedora 43: cdist 7.0.0-16.fc43 Β· GPL-3.0-only
- fedora 44: cdist 7.0.0-18.fc44 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms