Files
init.sh/modules/conf_ssh.sh

42 lines
1.2 KiB
Bash

# ------------------------------------------------------------------------------
# Configure SSH client and server
# This file is part of the init.sh project
# Copyright (c) 2019-2021 Geoffray Levasseur <fatalerrors@geoffray-levasseur.org>
# ------------------------------------------------------------------------------
# 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 $(basename $f) /etc/ssh/$(basename $f)
done
prnt I "Démarrage du sevice ssh..."
svc_start ssh
}
precheck_conf_ssh()
{
: # Nothing to check
}
export -f conf_ssh
export -f precheck_conf_ssh