CDIST-TYPE__SSHD_CONFIG(7)
π cdist-type__sshd_config β the manual page, but make it cute
okay bestie, so this is cdist-type__sshd_config, part of the cdist manuals (section 7, if you're keeping score π
). It's the little type that goes in and manages options inside your sshd_config. sshd said "let me be configured" and this type said "say less" π«Ά
β¨ NAME β¨
cdist-type__sshd_config β manage options in sshd_config π
π¦ DESCRIPTION π¦
This space intentionally left blank.
no like. literally. that's the whole description. the vibes are immaculate, the words are zero. π
π REQUIRED PARAMETERS π
None. nope. nada. you need nothing to get started, she's low maintenance fr fr β¨
π OPTIONAL PARAMETERS π
fileβ the path to thesshd_configfile you wanna edit. If you don't say anything, she just assumes/etc/ssh/sshd_config. default queen behavior πmatchβ restricts this option so it only applies to certain connections. whatever you're allowed to write after aMatchkeyword insshd_configis fair game here, like--match 'User anoncvs'.
You can use this one multiple times, and here's the tea: all of the values get ANDed together. every single one. no skipping.
optionβ the name of the option you're manipulating. defaults to__object_idif you don't specify π«Άstateβ can be either of these two besties:present: make sure a matching config line is there (or the default value is).absent: make sure no matching config line exists. bye bye π
valueβ the option's value that gets assigned to the option (when--state present) or removed (when--state absent).
This one is required if --state present. But if you leave it out and you're in --state absent, then all the values for that given option get removed. all of them. wiped. π
π BOOLEAN PARAMETERS π
None. no booleans here, we keep it simple β¨
π EXAMPLES π
okay this is the part you actually came for, let's go π§
# Disallow root logins with password
__sshd_config PermitRootLogin --value without-password
# Disallow password-based authentication
__sshd_config PasswordAuthentication --value no
# Accept the EDITOR environment variable
__sshd_config AcceptEnv:EDITOR --option AcceptEnv --value EDITOR
# Force command for connections as git user
__sshd_config git@ForceCommand --match 'User git' --option ForceCommand \
--value 'cd ~git && exec git-shell ${SSH_ORIGINAL_COMMAND:+-c "${SSH_ORIGINAL_COMMAND}"}'
copy them, love them, run them π
π¦ SEE ALSO π¦
sshd_config(5) β go read that one too, iykyk β¨
π BUGS π
ngl, there's some stuff you should know before you get got:
- This type assumes a nicely formatted config file, meaning no config options spanning multiple lines. if your config is doing the absolute most, she's not gonna handle it π
Includedirectives are ignored. fully. don't come for her.- Config options are not added or removed to/from the config file if their value is the default value. if it's already default, she's like "you're fine bestie" and moves on.
- The explorer will incorrectly report absent if OpenSSH internally transforms one value to another (for example,
permitrootlogin prohibit-passwordgets transformed topermitrootlogin without-password). the workaround? use the value that OpenSSH uses internally. periodt. π
π«Ά AUTHORS π«Ά
Dennis Camera <dennis.camera--@--ssrq-sds-fds.ch> π
π COPYING π
Copyright (C) 2020 Dennis Camera. 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.
β COPYRIGHT β
ungleich GmbH 2021
okay that's the whole page bestie, you ate it up π β¨ this was version 7.0.0, dated Jul 31, 2022, from the cdist manuals β now go forth and configure your sshd, you main character π¦π
π¦ 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