debian: Fix SSH key setup
This commit is contained in:
parent
d1fb8bb60f
commit
7f6f8cc365
1 changed files with 4 additions and 2 deletions
6
debian/debian-secure.sh
vendored
6
debian/debian-secure.sh
vendored
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue