fix root user's authorized_keys path (#337)

This commit is contained in:
Saeed Vaziry 2024-11-02 23:02:09 +01:00 committed by GitHub
parent 6639fac9c0
commit 23eee5a91e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,5 +1,5 @@
export DEBIAN_FRONTEND=noninteractive
echo "__key__" | sudo tee -a /home/root/.ssh/authorized_keys
echo "__key__" | sudo tee -a /root/.ssh/authorized_keys
sudo useradd -p $(openssl passwd -1 __password__) __user__
sudo usermod -aG sudo __user__
echo "__user__ ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers