(re)Disable root SSH logins
This commit is contained in:
parent
b34187b86a
commit
48f789c5b4
1 changed files with 1 additions and 1 deletions
|
|
@ -229,7 +229,7 @@ function update_live_env() {
|
|||
ssh-keygen -b 4096 -C "$username@$hostname" -N "" -f "$SKEL_DIR/.ssh/id_rsa"
|
||||
echo 'rm /root/.ssh/id*' >> "$LIVE_DIR/airootfs/root/customize_airootfs.sh"
|
||||
echo 'rm /root/.zlogin' >> "$LIVE_DIR/airootfs/root/customize_airootfs.sh"
|
||||
sed -r '/.*PermitRootLogin.*/d' "$LIVE_DIR/airootfs/root/customize_airootfs.sh"
|
||||
sed -i -r 's/^(.*PermitRootLogin.*)$/PermitRootLogin no/' "$LIVE_DIR/airootfs/root/customize_airootfs.sh"
|
||||
cp "$ROOT_DIR/.linux_items/authorized_keys" "$SKEL_DIR/.ssh/authorized_keys"
|
||||
|
||||
# Root user
|
||||
|
|
|
|||
Loading…
Reference in a new issue