V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 53s
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 53s
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -31,18 +31,16 @@ guard_sourcing
|
||||
# 0: on success
|
||||
#######################################
|
||||
installation_ssh() {
|
||||
do_in_target "${TARGET}" apt-get install -y ssh
|
||||
|
||||
#######################################
|
||||
# Variable declaration
|
||||
#######################################
|
||||
### Declare Arrays, HashMaps, and Variables.
|
||||
declare -a ary_user=()
|
||||
declare -i i
|
||||
declare var_auth="" var_name=""
|
||||
declare -i i=0
|
||||
declare var_auth="" var_name=""
|
||||
|
||||
install -D -m 0644 -o root -g root "${VAR_SETUP_PATH}/includes/etc/banner" "${TARGET}/etc/"
|
||||
install -D -m 0644 -o root -g root "${VAR_SETUP_PATH}/includes/etc/motd" "${TARGET}/etc/"
|
||||
do_log "info" "file_only" "Installed SSH banner and motd to '${TARGET}/etc/'."
|
||||
do_in_target "${TARGET}" apt-get install -y --no-install-recommends --no-install-suggests ssh
|
||||
|
||||
install -D -m 0644 -o root -g root "${VAR_SETUP_PATH}/includes/target/etc/banner" "${TARGET}/etc/"
|
||||
install -D -m 0644 -o root -g root "${VAR_SETUP_PATH}/includes/target/etc/motd" "${TARGET}/etc/"
|
||||
do_log "info" "file_only" "4420() Installed SSH banner and motd to '${TARGET}/etc/'."
|
||||
|
||||
### Only process those for which both *_name and *_authentication_access_ssh are set.
|
||||
for ((i = 0; i <= VAR_USER_MAX; i++)); do
|
||||
@@ -69,7 +67,7 @@ installation_ssh() {
|
||||
|
||||
rm -f "${TARGET}/etc/ssh/sshd_config"
|
||||
|
||||
install -D -m 0600 -o root -g root "${VAR_SETUP_PATH}/includes/etc/ssh/sshd_config" "${TARGET}/etc/ssh/sshd_config"
|
||||
install -D -m 0600 -o root -g root "${VAR_SETUP_PATH}/includes/target/etc/ssh/sshd_config" "${TARGET}/etc/ssh/sshd_config"
|
||||
chmod 0600 "${TARGET}/etc/ssh/ssh_config"
|
||||
|
||||
# shellcheck disable=SC2153
|
||||
@@ -107,6 +105,8 @@ installation_ssh() {
|
||||
#echo "readonly HISTFILE" >> "${TARGET}/etc/profile.d/idle-users.sh"
|
||||
chmod +x "${TARGET}/etc/profile.d/idle-users.sh"
|
||||
|
||||
do_log "info" "file_only" "4420() Installed: [ssh] successfully."
|
||||
|
||||
return 0
|
||||
}
|
||||
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh
|
||||
|
||||
Reference in New Issue
Block a user