Add hosting fixes
This commit is contained in:
parent
1a761fd17e
commit
2f446dc749
2 changed files with 10 additions and 7 deletions
0
doc/hosting_notes.md
Normal file
0
doc/hosting_notes.md
Normal file
|
@ -1,9 +1,5 @@
|
|||
export MY_USER="my_user"
|
||||
|
||||
# Create non-root user
|
||||
adduser $MY_USER
|
||||
usermod -aG sudo $MY_USER
|
||||
|
||||
# Set up firewall
|
||||
ufw allow OpenSSH
|
||||
ufw enable
|
||||
|
@ -14,10 +10,17 @@ ufw enable
|
|||
# PasswordAuthentication no
|
||||
# ChallengeResponseAuthentication no
|
||||
# UsePAM no
|
||||
# sudo systemctl restart ssh
|
||||
|
||||
# Create non-root user
|
||||
adduser $MY_USER
|
||||
usermod -aG sudo $MY_USER
|
||||
|
||||
# Enable ssh login
|
||||
rsync --archive --chown=$MY_USER:$MY_USER ~/.ssh /home/$MY_USER
|
||||
rsync --archive --chown=$MY_USER:$MY_USER ~/.ssh /home/$MY_USER/.ssh
|
||||
|
||||
# Fail2ban for SSH
|
||||
apt install fail2ban
|
||||
|
||||
# Restart ssh
|
||||
sudo systemctl restart ssh
|
||||
|
||||
|
|
Loading…
Reference in a new issue