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
|
||||
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
|
||||
|
||||
# make config files
|
||||
@@ -43,14 +43,5 @@ docker compose up -d
|
||||
usermod -a -G docker ubuntu
|
||||
|
||||
# SSH
|
||||
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
|
||||
sed -E 's/^.*PasswordAuthentication yes.*$/PasswordAuthentication no/' -i /etc/ssh/sshd_config
|
||||
echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIq7eEoXW6aUp5kdoG3YC6EulPH9SsSemDBzyv/Tofjr amogus" >> /home/ubuntu/.ssh/authorized_keys
|
||||
|
||||
Reference in New Issue
Block a user