diff options
Diffstat (limited to 'playbooks.d/ssh')
-rw-r--r-- | playbooks.d/ssh/playbook.bash | 8 | ||||
-rw-r--r-- | playbooks.d/ssh/share/motd.satpl (renamed from playbooks.d/ssh/share/motd) | 0 | ||||
-rw-r--r-- | playbooks.d/ssh/share/notify.sh | 8 | ||||
-rw-r--r-- | playbooks.d/ssh/share/sshd_config.satpl (renamed from playbooks.d/ssh/share/sshd_config) | 2 |
4 files changed, 3 insertions, 15 deletions
diff --git a/playbooks.d/ssh/playbook.bash b/playbooks.d/ssh/playbook.bash index 0d70699..66d5963 100644 --- a/playbooks.d/ssh/playbook.bash +++ b/playbooks.d/ssh/playbook.bash @@ -13,7 +13,7 @@ playbook_add() { playbook_sync() { info "$BASHTARD_PLAYBOOK" "Templating sshd_config" - file_template "sshd_config" \ + file_template "sshd_config.satpl" \ "sftp=$(config "ssh.sftp")" \ > /etc/ssh/sshd_config @@ -26,15 +26,11 @@ playbook_sync() { fi info "$BASHTARD_PLAYBOOK" "Generating MotD" - file_template "motd" \ + file_template "motd.satpl" \ "fqdn=${BASHTARD_PLATFORM[fqdn]}" \ "time=$(date -u "+%FT%T")" \ > /etc/motd - info "$BASHTARD_PLAYBOOK" "Installing notification script" - file_template "notify.sh" \ - > /etc/ssh/notify.sh - [[ $BASHTARD_COMMAND == "add" ]] && return svc reload "sshd" diff --git a/playbooks.d/ssh/share/motd b/playbooks.d/ssh/share/motd.satpl index 7fc4e34..7fc4e34 100644 --- a/playbooks.d/ssh/share/motd +++ b/playbooks.d/ssh/share/motd.satpl diff --git a/playbooks.d/ssh/share/notify.sh b/playbooks.d/ssh/share/notify.sh deleted file mode 100644 index 00e0b9f..0000000 --- a/playbooks.d/ssh/share/notify.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -if [ "$PAM_TYPE" != "open_session" ] -then - exit 0 -fi - -ntfy send "$PAM_USER@$(hostname -f)" "Login Succesful" diff --git a/playbooks.d/ssh/share/sshd_config b/playbooks.d/ssh/share/sshd_config.satpl index 900ed34..8a9f2db 100644 --- a/playbooks.d/ssh/share/sshd_config +++ b/playbooks.d/ssh/share/sshd_config.satpl @@ -28,6 +28,6 @@ Match User tyil PubkeyAuthentication yes # Allow public key authentication over VPN -Match Address 10.57.0.0/16 +Match Address 10.57.0.0/16,10.58.0.0/16,fd68:1057:1992:3381::/64,fd68:1058:1992:3381::/64 PubkeyAuthentication yes PermitRootLogin prohibit-password |