This commit is contained in:
2019-10-04 08:10:07 -07:00
parent 45a2bcf34e
commit d9f759a43c
6 changed files with 21 additions and 8 deletions

View File

@@ -0,0 +1,21 @@
#!/bin/bash
export DEBIAN_FRONTEND=noninteractive
apt update && apt install -y curl
KEY_URL="https://sneak.cloud/authorized_keys"
# CAUTION! /!\
# doing only passwd -d <user> means they can log in at the console
# with no password whatsoever - probably not what you want
curl -fLo /root/.ssh/authorized_keys --create-dirs $KEY_URL && \
passwd -d root && \
passwd -l root
curl -fLo /home/pi/.ssh/authorized_keys --create-dirs $KEY_URL && \
passwd -d pi && \
passwd -l pi
chown -R pi:pi /home/pi/.ssh