debian: Fix SSH key setup

This commit is contained in:
Minecon724 2025-08-02 14:06:37 +02:00
commit 7f6f8cc365

View file

@ -32,8 +32,10 @@ systemctl enable --now wg-quick@vmh-ssh-vpn
echo "Configuring ssh..."
mkdir /home/$USERNAME/.ssh
echo $MY_SSH_KEY > /home/$USERNAME/.ssh/authorized_keys
mkdir -p /home/$USERNAME/.ssh
chown $USERNAME:$USERNAME /home/$USERNAME/.ssh
echo "$MY_SSH_KEY" > /home/$USERNAME/.ssh/authorized_keys
chown $USERNAME:$USERNAME /home/$USERNAME/.ssh/authorized_keys
chmod 600 /home/$USERNAME/.ssh/authorized_keys
chmod 700 /home/$USERNAME/.ssh