#!/bin/bash # ALT templates disable password authentication globally; allow bootstrap only # for the required router administrator. Root policy remains unchanged. set -euo pipefail if ! grep -q '^# KIM2027 router administrator$' /etc/openssh/sshd_config; then cat >> /etc/openssh/sshd_config <<'EOF' # KIM2027 router administrator Match User net_admin PasswordAuthentication yes Match all EOF fi sshd -t systemctl restart sshd sshd -T -C user=net_admin,host=br-srv,addr=192.168.200.2 | grep '^passwordauthentication yes$'