commit 5acbae152c5d9b56d4392a4fc9fe203ec493fa20 parent fc8112a6a11aa865850a152a0dc801641c6f1de7 Author: Damian Myrda <damian@prime8.dev> Date: Sat, 7 Sep 2024 18:03:03 -0500 Fix port assignment Diffstat:
| M | setup.sh | | | 8 | ++++---- |
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git 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