Skip to content

Instantly share code, notes, and snippets.

@maheshsenni
Last active July 16, 2020 17:17
Show Gist options
  • Save maheshsenni/e5d4453ca631f045f549c5e321fcd4a7 to your computer and use it in GitHub Desktop.
Save maheshsenni/e5d4453ca631f045f549c5e321fcd4a7 to your computer and use it in GitHub Desktop.
# Enable SSH
echo 'ssh' >/tmp/1/ssh
# Configure WiFi
cat > /tmp/1/wpa_supplicant.conf << EOF
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=<TWO_LETTER_ISO_COUNTRY_CODE>
network={
ssid="<WIFI_NETWORK_NAME>"
psk="<WIFI_PASSWORD>"
key_mgmt=WPA-PSK
}
EOF
@maheshsenni
Copy link
Author

@tcarreira Updated. Thanks for letting me know. Looks a lot cleaner with heredoc.

@tcarreira
Copy link

@tcarreira Updated. Thanks for letting me know. Looks a lot cleaner with heredoc.

you are welcome :)

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