dev-scripts/server-install-base.sh

14 lines
389 B
Bash
Raw Normal View History

2020-06-08 18:59:06 +00:00
#!/bin/sh
2020-06-08 21:32:05 +00:00
apt upgrade -y || exit 10
apt install -y tmux ufw curl || exit 15
2020-06-08 19:20:39 +00:00
2020-06-08 20:42:47 +00:00
sed -i '/PubkeyAuthentication/c\PubkeyAuthentication yes' /etc/ssh/sshd_config
sed -i '/PasswordAuthentication/c\PasswordAuthentication no' /etc/ssh/sshd_config
sed -i '/PermitRootLogin/c\PermitRootLogin prohibit-password' /etc/ssh/sshd_config
systemctl restart sshd
2020-06-08 19:20:39 +00:00
ufw allow ssh || exit 20
2020-06-08 20:17:30 +00:00
yes | ufw enable
2020-06-08 20:42:47 +00:00