hacks/fix-raspian-defaults/root/boot/per-once.d/99-setup-keys.sh

14 lines
332 B
Bash
Raw Normal View History

2019-10-04 12:55:40 +00:00
#!/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