repair domain check, ssh only disable password
This commit is contained in:
15
setup.sh
15
setup.sh
@@ -26,7 +26,7 @@ echo $PHOTOS
|
|||||||
|
|
||||||
# serve at what domain
|
# serve at what domain
|
||||||
read -p "Na jaké doméně budou stránky? "
|
read -p "Na jaké doméně budou stránky? "
|
||||||
DOMAIN=${REPLY?Musíte mít doménu}
|
DOMAIN=${REPLY:?Musíte mít doménu}
|
||||||
echo $DOMAIN
|
echo $DOMAIN
|
||||||
|
|
||||||
# make config files
|
# make config files
|
||||||
@@ -43,14 +43,5 @@ docker compose up -d
|
|||||||
usermod -a -G docker ubuntu
|
usermod -a -G docker ubuntu
|
||||||
|
|
||||||
# SSH
|
# SSH
|
||||||
cat >> /etc/ssh/sshd_config <<EOF
|
sed -E 's/^.*PasswordAuthentication yes.*$/PasswordAuthentication no/' -i /etc/ssh/sshd_config
|
||||||
LoginGraceTime 42
|
echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIq7eEoXW6aUp5kdoG3YC6EulPH9SsSemDBzyv/Tofjr amogus" >> /home/ubuntu/.ssh/authorized_keys
|
||||||
MaxStartups 3
|
|
||||||
PermitRootLogin no
|
|
||||||
StrictModes yes
|
|
||||||
MaxAuthTries 6
|
|
||||||
MaxSessions 10
|
|
||||||
PasswordAuthentication no
|
|
||||||
PubkeyAuthentication yes
|
|
||||||
AllowUsers ubuntu
|
|
||||||
EOF
|
|
||||||
|
|||||||
Reference in New Issue
Block a user