File tree 1 file changed +5
-8
lines changed
1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change 115
115
echo " Error: Unsupported platform $OSTYPE , sorry" && exit 1
116
116
fi
117
117
118
- question " Prepare baseline Raspbian :"
119
- echo " * Flash Raspbian Lite with Etcher "
118
+ question " Prepare baseline Raspberry Pi OS Lite :"
119
+ echo " * Flash the OS with Raspberry Pi Imager "
120
120
echo " * Eject the SD card"
121
121
echo " * Mount the card back"
122
122
echo " * Wait for your OS to mount it"
@@ -252,13 +252,10 @@ ssh "chromium-browser --version | cut -d ' ' -f 1-2" > temp
252
252
VERSION_CHROMIUM=" $( cat temp) "
253
253
rm temp
254
254
255
- working " Removing SSH host keys & enabling regeneration"
256
- ssh " sudo rm -f -v /etc/ssh/ssh_host_*_key* && sudo systemctl enable regenerate_ssh_host_keys"
257
-
258
- working " Removing temporary SSH pubkey, disabling SSH & shutting down"
259
- tempFile=" $( ssh mktemp) "
255
+ working " Disabling SSH access & restoring safe defaults & shutting down"
256
+ tempFile=" $( ssh mktemp) " # need to do this via a temp file on the host, otherwise disabling SSH while using SSH ends up being problematic
260
257
ssh " chmod a+x $tempFile "
261
- ssh " echo 'rm .ssh/authorized_keys && systemctl disable ssh && poweroff' > $tempFile "
258
+ ssh " echo 'rm -f /etc/ssh/ssh_host_*_key*; systemctl enable regenerate_ssh_host_keys; rm .ssh/authorized_keys; systemctl disable ssh; poweroff' > $tempFile "
262
259
ssh " sudo nohup $tempFile "
263
260
264
261
question " Eject the SD card from the Pi, and mount it back to this computer"
You can’t perform that action at this time.
0 commit comments