]> prime8.dev >> repos - p8d.git/commitdiff
Fix port assignment
authorDamian Myrda <monkey.damianek@gmail.com>
Sat, 7 Sep 2024 23:03:03 +0000 (18:03 -0500)
committerDamian Myrda <monkey.damianek@gmail.com>
Sun, 8 Sep 2024 03:37:13 +0000 (22:37 -0500)
setup.sh

index afc2390c7335534de0d593a321e220e02fd310c4..2ff5dcf1e34a0845d825ec173696207a46256c1a 100755 (executable)
--- a/setup.sh
+++ b/setup.sh
@@ -20,10 +20,10 @@ echo "firewall set up"
 
 echo "securing ssh"
 PORT=2222
-sudo sed -i -e 's/^#\?PasswordAuthentication .*/PasswordAuthentication no/' \
-            -e 's/^#\?PermitRootLogin .*/PermitRootLogin no/' \
-            -e 's/^#\?UsePAM .*/UsePAM no/' \
-            -e 's/^#\?Port .*/Port $PORT/' \
+sudo sed -i -e "s/^#\?PasswordAuthentication .*/PasswordAuthentication no/" \
+            -e "s/^#\?PermitRootLogin .*/PermitRootLogin no/" \
+            -e "s/^#\?UsePAM .*/UsePAM no/" \
+            -e "s/^#\?Port .*/Port $PORT/" \
             /etc/ssh/sshd_config
 echo "switched port to $PORT"
 sudo systemctl restart ssh