summaryrefslogtreecommitdiff
path: root/playbooks.d/ssh/share
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2022-05-04 12:05:39 +0200
committerPatrick Spek <p.spek@tyil.nl>2022-05-04 12:19:55 +0200
commit319ab064370cb1e65be115ffddf5c0cd519af2dd (patch)
treeee7a3e3890060f8533c9043027fdc15cb6ad5866 /playbooks.d/ssh/share
parent2bb941691c0fc8320d50d44563ddeb96d551b0d1 (diff)
Add a playbook for sshd configuration
Diffstat (limited to 'playbooks.d/ssh/share')
-rw-r--r--playbooks.d/ssh/share/motd8
-rw-r--r--playbooks.d/ssh/share/sshd_config27
2 files changed, 35 insertions, 0 deletions
diff --git a/playbooks.d/ssh/share/motd b/playbooks.d/ssh/share/motd
new file mode 100644
index 0000000..7fc4e34
--- /dev/null
+++ b/playbooks.d/ssh/share/motd
@@ -0,0 +1,8 @@
+ ████████╗██╗ ██╗██╗██╗ ███╗ ██╗███████╗████████╗
+ ╚══██╔══╝╚██╗ ██╔╝██║██║ ████╗ ██║██╔════╝╚══██╔══╝
+ ██║ ╚████╔╝ ██║██║ ██╔██╗ ██║█████╗ ██║
+ ██║ ╚██╔╝ ██║██║ ██║╚██╗██║██╔══╝ ██║
+ ██║ ██║ ██║███████╗██╗██║ ╚████║███████╗ ██║
+ ╚═╝ ╚═╝ ╚═╝╚══════╝╚═╝╚═╝ ╚═══╝╚══════╝ ╚═╝
+
+Welcome to ${fqdn}, last updated on ${time}.
diff --git a/playbooks.d/ssh/share/sshd_config b/playbooks.d/ssh/share/sshd_config
new file mode 100644
index 0000000..97bea2e
--- /dev/null
+++ b/playbooks.d/ssh/share/sshd_config
@@ -0,0 +1,27 @@
+# Connectivity
+Port 22
+AddressFamily any
+ListenAddress 0.0.0.0
+ListenAddress ::
+
+# Fluff
+PrintMotd yes
+
+# SFTP
+Subsystem sftp ${sftp}
+
+# Authentication
+AuthorizedKeysFile /etc/ssh/authorized_keys .ssh/authorized_keys
+PermitRootLogin no
+PasswordAuthentication no
+ChallengeResponseAuthentication no
+PubkeyAuthentication no
+
+# Allow tyil
+Match User tyil
+ PubkeyAuthentication yes
+
+# Allow public key authentication over VPN
+Match Address 10.57.0.0/16
+ PubkeyAuthentication yes
+ PermitRootLogin prohibit-password