# ------------------------------------------------------------------------------ # Configure SSH client and server # This file is part of the init.sh project # Copyright (c) 2019-2021 Geoffray Levasseur # ------------------------------------------------------------------------------ # This file is distributed under 3-clause BSD license. # The complete license agreement can be obtained at: # https://opensource.org/licenses/BSD-3-Clause # ------------------------------------------------------------------------------ # Variable: # none # ------------------------------------------------------------------------------ export VER_conf_ssh="0.0.1" export DEP_conf_ssh="upgrade_dist" conf_ssh() { prnt I "Installation du serveur OpenSSH..." pkginst openssh-server prnt I "ArrĂȘt du service SSH..." svc_stop ssh prnt I "Installation des fichiers de configuration de SSH..." for f in /etc/ssh/ssh{,d}_config; do backupdist $f installfile ssh/$(basename $f) /etc/ssh/$(basename $f) done prnt I "DĂ©marrage du sevice ssh..." svc_start ssh } precheck_conf_ssh() { file_exists ssh/ssh{,d}_config } export -f conf_ssh export -f precheck_conf_ssh # EOF