From: Damian Myrda Date: Sat, 7 Sep 2024 23:03:03 +0000 (-0500) Subject: Fix port assignment X-Git-Url: http://git.prime8.dev/?a=commitdiff_plain;h=921e3330fca59f7168e0c5da24c080d592c0b5fc;p=p8d.git Fix port assignment --- diff --git a/setup.sh b/setup.sh index afc2390..2ff5dcf 100755 --- 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