V8.00.000.2025.06.17
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -22,7 +22,7 @@ guard_sourcing
|
||||
# VAR_FINAL_IPV4
|
||||
# VAR_FINAL_IPV6
|
||||
# VAR_SETUP_PATH
|
||||
# user_ssh_port
|
||||
# ssh_port
|
||||
# user_user0_name
|
||||
# Arguments:
|
||||
# None
|
||||
@@ -67,15 +67,15 @@ setup_ssh() {
|
||||
sed -i "/^\s*ListenAddress\s*::/d" "${TARGET}/etc/ssh/sshd_config"
|
||||
fi
|
||||
|
||||
sed -i "s/Port MUST_BE_CHANGED/Port ${user_ssh_port}/" "${TARGET}/etc/ssh/sshd_config"
|
||||
sed -i "s/Port MUST_BE_CHANGED/Port ${ssh_port}/" "${TARGET}/etc/ssh/sshd_config"
|
||||
|
||||
if [[ -n "${user_user0_name}" ]]; then
|
||||
sed -i "s/AllowUsers root/AllowUsers root ${ary_user[*]}/" "${TARGET}/etc/ssh/sshd_config"
|
||||
fi
|
||||
|
||||
if [[ -n "${user_ssh_rootca}" ]]; then
|
||||
install -D -m 0644 -o root -g root "${VAR_SETUP_PATH}${user_ssh_rootca}" "${TARGET}/etc/ssh/"
|
||||
sed -i "s/TrustedUserCAKeys none/TrustedUserCAKeys \/etc\/ssh\/${user_ssh_rootca}/" "${TARGET}/etc/ssh/sshd_config"
|
||||
if [[ -n "${ssh_root_ca}" ]]; then
|
||||
install -D -m 0644 -o root -g root "${VAR_SETUP_PATH}${ssh_root_ca}" "${TARGET}/etc/ssh/"
|
||||
sed -i "s/TrustedUserCAKeys none/TrustedUserCAKeys \/etc\/ssh\/${ssh_root_ca}/" "${TARGET}/etc/ssh/sshd_config"
|
||||
fi
|
||||
|
||||
do_in_target_script "${TARGET}" "sshd -T >| ${DIR_LOG}/sshd_config.log"
|
||||
|
||||
Reference in New Issue
Block a user