From 2f446dc749d549204240d842a3d45b773b819eb4 Mon Sep 17 00:00:00 2001 From: jgrogan Date: Mon, 26 Aug 2024 15:56:25 +0100 Subject: [PATCH 1/2] Add hosting fixes --- doc/hosting_notes.md | 0 infra/scripts/setup_machine.sh | 17 ++++++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) create mode 100644 doc/hosting_notes.md diff --git a/doc/hosting_notes.md b/doc/hosting_notes.md new file mode 100644 index 0000000..e69de29 diff --git a/infra/scripts/setup_machine.sh b/infra/scripts/setup_machine.sh index 0278354..a853419 100644 --- a/infra/scripts/setup_machine.sh +++ b/infra/scripts/setup_machine.sh @@ -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 \ No newline at end of file +apt install fail2ban + +# Restart ssh +sudo systemctl restart ssh + From 7eeed4e4357320b638a39d1ef7218a67f86edecb Mon Sep 17 00:00:00 2001 From: jgrogan Date: Mon, 26 Aug 2024 15:58:38 +0100 Subject: [PATCH 2/2] Add forgejo notes --- doc/forgejo.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 doc/forgejo.md diff --git a/doc/forgejo.md b/doc/forgejo.md new file mode 100644 index 0000000..9c1f6a1 --- /dev/null +++ b/doc/forgejo.md @@ -0,0 +1,9 @@ + + + +# Further Reading # + +* Admin guide: https://forgejo.org/docs/latest/admin/ + +* Arch notes: https://wiki.archlinux.org/title/Forgejo +