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