Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 1.65 KB

README.md

File metadata and controls

26 lines (19 loc) · 1.65 KB

fix-ssh-on-pi

Safely enabling ssh in the default Raspberry Pi OS (previously called Raspbian) Image

This script will make some small but necessary changes to a default Raspberry Pi OS (previously called Raspbian) image.

In episode hpr2356 :: Safely enabling ssh in the default Raspbian Image I walked through the first steps of automating the update of this base image. It will:

  • Download the latest image zip file
  • Verify it is valid
  • Extract the image itself
  • Enable ssh for secure remote management
  • Change the default passwords for the root and pi user
  • Secure the ssh server on the Pi

Since then I improved the script to:

  • Enable connections to your WiFi network (default_wifi.nmconnection)
  • Load it's configuration from a ini file keeping sensitive information separate from the main script.
  • Using losetup to greatly simplify the mounting of the image.
  • Creation of a First Boot script.
  • Moved creation of the passwords and accounts to the ini file
  • Added support to select which Raspberry_Pi_OS Version to download
  • Added support set up default users using userconf.txt

This script is part of a series "Manage your Raspberry Pi fleet with Ansible" which was covered on opensource.com and on Hacker Public Radio.