configure ssh

This commit is contained in:
Ray Elliott 2020-06-08 21:42:47 +01:00
parent 52a52a6ecb
commit bff3859156
1 changed files with 6 additions and 0 deletions

View File

@ -3,5 +3,11 @@
apt upgrade || exit 10
apt install -y tmux ufw || exit 15
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
ufw allow ssh || exit 20
yes | ufw enable