scripts: update ssh port
This commit is contained in:
@@ -109,14 +109,14 @@ banner bottom "installed cron"
|
||||
banner top "configuring sshd"
|
||||
sudo tee /etc/ssh/sshd_config << 'EOF'
|
||||
Include /etc/ssh/sshd_config.d/*.conf
|
||||
Port 67
|
||||
Port 66
|
||||
PermitRootLogin no
|
||||
PasswordAuthentication no
|
||||
KbdInteractiveAuthentication no
|
||||
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
|
||||
banner bottom "configuring sshd"
|
||||
|
||||
# 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"
|
||||
|
||||
Reference in New Issue
Block a user