Update: maintenance keys belongs to 'pi' user
This commit is contained in:
parent
142aaf53a8
commit
473fb677cc
12
clone/clone
12
clone/clone
|
@ -149,6 +149,7 @@ step5(){
|
||||||
echo " (.) emulate \`groupadd ssh-key\`";
|
echo " (.) emulate \`groupadd ssh-key\`";
|
||||||
echo " - /etc/group";
|
echo " - /etc/group";
|
||||||
echo " (.) emulate \`usermod -a -G ssh-key,sats sats\`";
|
echo " (.) emulate \`usermod -a -G ssh-key,sats sats\`";
|
||||||
|
echo " (.) emulate \`usermod -a -G ssh-key pi\`";
|
||||||
echo " - /etc/group";
|
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;
|
||||||
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 #
|
# (5) Add maintenance keys #
|
||||||
echo " (.) Add maintenance keys'";
|
echo " (.) Add maintenance keys (for 'pi' user)";
|
||||||
sudo touch /mnt/home/sats/.ssh/authorized_keys;
|
sudo mkdir -p /mnt/home/pi/.ssh;
|
||||||
cat ./server/maintenance/*.pub | sudo tee /mnt/home/sats/.ssh/authorized_keys > /dev/null;
|
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 #
|
# (6) Set up permissions #
|
||||||
echo " (.) 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 chown -R 666:666 /mnt/home/sats/;
|
||||||
sudo chmod 400 /mnt/home/sats/.ssh/*;
|
sudo chmod 400 /mnt/home/sats/.ssh/*;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=SATS Boot Process
|
Description=SATS Boot Process
|
||||||
Requires=network-online.target
|
Requires=network-online.target
|
||||||
After=network-online.target
|
After=network-online.target network.target
|
||||||
Before=sats-loop.service
|
Before=sats-loop.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
|
|
Loading…
Reference in New Issue