Skip to content

Instantly share code, notes, and snippets.

@lightscalar
Last active January 24, 2020 16:46
Show Gist options
  • Save lightscalar/cab1b9e70e97851321aa6cd58853cb4a to your computer and use it in GitHub Desktop.
Save lightscalar/cab1b9e70e97851321aa6cd58853cb4a to your computer and use it in GitHub Desktop.
Setting up Raspberry Pi as hotspot!
  1. Burn Buster image onto SD card.
  2. Navigate to /Volumes/boot
  3. Create a file called wpa_supplicant.conf
  4. Put this in it...
country=US # Your 2-digit country code
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
network={
    ssid="YOUR_NETWORK_NAME"
    psk="YOUR_PASSWORD"
    key_mgmt=WPA-PSK
}
  1. Enable SSH by running touch ssh in /Volumes/boot.
  2. Log into the Raspberry Pi now. Modify the hostname of the Pi to whatever you like:
sudo nano /etc/hostname

Change raspberrypi to WHATEVER

Next,

sudo nano /etc/hosts

Find the line starting with 127.0.0.1, and change the name following it to your new hostname.

Setup SSH keys.

If you already have SSH keys on your system, simply...

ssh-copy-id [email protected]

If you experience problems logging in (WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!, e.g.), you may have to remove the IP address from known hosts. This can be accomplished via the ssh-keygen utility:

ssh-keygen -R [hostname-or-IP]

Et voila!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment