ssh hardening and docker group

This commit is contained in:
2023-06-23 11:37:35 +02:00
parent fe4d6e9060
commit 19c71705bd

View File

@@ -39,5 +39,18 @@ sed -e "s:__PHOTO__:$PHOTOS:" docker-compose.yml | sudo -u ubuntu tee $home/etc/
cd $home/etc
docker compose up -d
# add user ubuntu to docker group
usermod -a -G docker ubuntu
# SSH
# #TODO
cat >> /etc/ssh/sshd_config <<EOF
LoginGraceTime 42
MaxStartups 3
PermitRootLogin no
StrictModes yes
MaxAuthTries 6
MaxSessions 10
PasswordAuthentication no
PubkeyAuthentication yes
AllowUsers ubuntu
EOF