configure ssh
This commit is contained in:
parent
52a52a6ecb
commit
bff3859156
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue