scripts: update ssh port

This commit is contained in:
2026-07-24 13:23:49 +01:00
parent 08c4c78c8e
commit 2ebf7ca958
+3 -3
View File
@@ -109,14 +109,14 @@ banner bottom "installed cron"
banner top "configuring sshd" banner top "configuring sshd"
sudo tee /etc/ssh/sshd_config << 'EOF' sudo tee /etc/ssh/sshd_config << 'EOF'
Include /etc/ssh/sshd_config.d/*.conf Include /etc/ssh/sshd_config.d/*.conf
Port 67 Port 66
PermitRootLogin no PermitRootLogin no
PasswordAuthentication no PasswordAuthentication no
KbdInteractiveAuthentication no KbdInteractiveAuthentication no
EOF EOF
sudo semanage port -a -t ssh_port_t -p tcp 67 sudo semanage port -a -t ssh_port_t -p tcp 66
sudo systemctl restart sshd sudo systemctl restart sshd
banner bottom "configuring sshd" banner bottom "configuring sshd"
# finish # finish
echo -e "done! please log out and log back in with \e[1;5mssh -p 67 $(id -un)@$(curl -s https://checkip.amazonaws.com)\e[0m\n" echo -e "done! please log out and log back in with \e[1;5mssh -p 66 $(id -un)@$(curl -s https://checkip.amazonaws.com)\e[0m\n"