Browse Source

reduce ssh surface area

Steven Jacobs 1 year ago
parent
commit
b5c75ee282
1 changed files with 6 additions and 0 deletions
  1. 6 0
      scripts/05-ssh

+ 6 - 0
scripts/05-ssh

@@ -0,0 +1,6 @@
+#!/bin/sh
+
+sed -i "s/.*PubkeyAuthentication.*/PubkeyAuthentication yes/g" /etc/ssh/sshd_config
+sed -i "s/.*PasswordAuthentication.*/PasswordAuthentication no/g" /etc/ssh/sshd_config
+
+systemctl restart sshd