From 6cdf2a421168bec5d7b9bd72d22d344f931ec658 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 16 Sep 2018 15:41:14 -0600 Subject: [PATCH] Added authorized_keys file for SSH connections --- .linux_items/authorized_keys | 1 + Build Linux | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 .linux_items/authorized_keys diff --git a/.linux_items/authorized_keys b/.linux_items/authorized_keys new file mode 100644 index 00000000..be79388e --- /dev/null +++ b/.linux_items/authorized_keys @@ -0,0 +1 @@ +#Put SSH keys here diff --git a/Build Linux b/Build Linux index 94556c2a..512aa982 100755 --- a/Build Linux +++ b/Build Linux @@ -229,7 +229,8 @@ 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 -i -r 's/^(.*PermitRootLogin.*)$/#NOPE#\1/' "$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 echo "echo 'root:$ROOT_PASSWORD' | chpasswd" >> "$LIVE_DIR/airootfs/root/customize_airootfs.sh"