hacks/fix-raspian-defaults/root.overlay/boot/per-once.d/99-setup-keys.sh
2019-10-04 06:46:23 -07:00

14 lines
332 B
Bash

#!/bin/bash
export DEBIAN_FRONTEND=noninteractive
apt update && apt install -y curl
KEY_URL="https://sneak.cloud/authorized_keys"
curl -fLo /root/.ssh/authorized_keys --create-dirs $KEY_URL && \
passwd -d root
curl -fLo /home/pi/.ssh/authorized_keys --create-dirs $KEY_URL && \
passwd -d pi
chown -R pi:pi /home/pi/.ssh