Compare commits
2 Commits
a0faa7629d
...
7fcaf9a84d
| Author | SHA1 | Date | |
|---|---|---|---|
| 7fcaf9a84d | |||
| 003dc11383 |
10
bootstrap.sh
10
bootstrap.sh
@@ -11,8 +11,8 @@ CRONTABTMP="/tmp/crontab.root.tmp"
|
||||
HOSTNAME=$(hostname)
|
||||
KEYFILE="/root/.ssh/$HOSTNAME"
|
||||
TEMP_SCRIPT="/root/firstlogin.sh"
|
||||
TEMP_SCRIPT_WRAPPER="root/firstloginwrapper.sh"
|
||||
TEMP_SCRIPT_CLEANER="root/firstlogincleaner.sh"
|
||||
TEMP_SCRIPT_WRAPPER="/root/firstloginwrapper.sh"
|
||||
TEMP_SCRIPT_CLEANER="/root/firstlogincleaner.sh"
|
||||
|
||||
|
||||
#################. ALIASES
|
||||
@@ -205,4 +205,8 @@ ssh-keygen -t ed25519 -C "$HOSTNAME" -f "$KEYFILE" -N ""
|
||||
|
||||
# Ajouter la clé publique dans authorized_keys
|
||||
cat "${KEYFILE}.pub" >> /root/.ssh/authorized_keys
|
||||
chmod 600 /root/.ssh/authorized_keys
|
||||
chmod 600 /root/.ssh/authorized_keys
|
||||
|
||||
rm -fr /etc/systemd/system/bootstrap.service
|
||||
rm -fr /etc/systemd/system/multi-user.target.wants/bootstrap.service
|
||||
systemctl daemon-reload
|
||||
Reference in New Issue
Block a user