logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

cdist-type__sshd_config - Manage options in sshd_config

Authors

Dennis Camera <dennis.camera--@--ssrq-sds-fds.ch>

Boolean Parameters

None.

Bugs

• This type assumes a nicely formatted config file, i.e. no config options spanning multiple lines. • Include directives are ignored. • Config options are not added/removed to/from the config file if their value is the default value. • The explorer will incorrectly report absent if OpenSSH internally transforms one value to another (e.g. permitrootloginprohibit-password is transformed to permitrootloginwithout-password). Workaround: Use the value that OpenSSH uses internally.

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.

Description

This space intentionally left blank.

Examples

# 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}"}'

Name

cdist-type__sshd_config - Manage options in sshd_config

Optional Parameters

file The path to the sshd_config file to edit. Defaults to /etc/ssh/sshd_config. match Restrict this option to apply only for certain connections. Allowed values are what would be allowed to be written after a Match keyword in sshd_config, e.g. --match'Useranoncvs'. Can be used multiple times. All of the values are ANDed together. option The name of the option to manipulate. Defaults to __object_id. state Can be: • present: ensure a matching config line is present (or the default value). • absent: ensure no matching config line is present. value The option's value to be assigned to the option (if --statepresent) or removed (if --stateabsent). This option is required if --statepresent. If not specified and --stateabsent, all values for the given option are removed.

Required Parameters

None.

See Also

sshd_config(5)

See Also