diff --git a/clone/clone b/clone/clone index 8f9cc8c..a11c882 100755 --- a/clone/clone +++ b/clone/clone @@ -149,6 +149,7 @@ step5(){ echo " (.) emulate \`groupadd ssh-key\`"; echo " - /etc/group"; echo " (.) emulate \`usermod -a -G ssh-key,sats sats\`"; + echo " (.) emulate \`usermod -a -G ssh-key pi\`"; echo " - /etc/group"; cat ./utility/group_append | sudo tee -a /mnt/etc/group > /dev/null; cat ./utility/group_append | sudo tee -a /mnt/etc/group- > /dev/null; @@ -190,12 +191,17 @@ step6(){ # (5) Add maintenance keys # - echo " (.) Add maintenance keys'"; - sudo touch /mnt/home/sats/.ssh/authorized_keys; - cat ./server/maintenance/*.pub | sudo tee /mnt/home/sats/.ssh/authorized_keys > /dev/null; + echo " (.) Add maintenance keys (for 'pi' user)"; + sudo mkdir -p /mnt/home/pi/.ssh; + sudo touch /mnt/home/pi/.ssh/authorized_keys; + cat ./server/maintenance/*.pub | sudo tee /mnt/home/pi/.ssh/authorized_keys > /dev/null; # (6) Set up permissions # echo " (.) Set up permissions"; + sudo chown -R 1000:1000 /mnt/home/pi/.ssh; + sudo chmod 550 /mnt/home/pi/.ssh; + sudo chmod 400 /mnt/home/pi/.ssh/authorized_keys; + sudo chown -R 666:666 /mnt/home/sats/; sudo chmod 400 /mnt/home/sats/.ssh/*; diff --git a/clone/utility/sats-boot.service b/clone/utility/sats-boot.service index fdf865a..f70df75 100644 --- a/clone/utility/sats-boot.service +++ b/clone/utility/sats-boot.service @@ -1,7 +1,7 @@ [Unit] Description=SATS Boot Process Requires=network-online.target -After=network-online.target +After=network-online.target network.target Before=sats-loop.service [Service]