ssh hardening and docker group
This commit is contained in:
15
setup.sh
15
setup.sh
@@ -39,5 +39,18 @@ sed -e "s:__PHOTO__:$PHOTOS:" docker-compose.yml | sudo -u ubuntu tee $home/etc/
|
|||||||
cd $home/etc
|
cd $home/etc
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
|
|
||||||
|
# add user ubuntu to docker group
|
||||||
|
usermod -a -G docker ubuntu
|
||||||
|
|
||||||
# SSH
|
# 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
|
||||||
|
|||||||
Reference in New Issue
Block a user