hacks/fix-raspian-defaults/root/boot/per-once.d/99-setup-keys.sh
2019-10-04 05:55:40 -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