Last active
January 11, 2024 17:47
-
-
Save grenade/ec1e657ae52392756e7ff1827daa68d1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# usage: | |
# curl -sL https://gist.github.com/grenade/ec1e657ae52392756e7ff1827daa68d1/raw/cctv-setup.sh?$(uuidgen) | bash | |
#sudo dnf install -y https://github.com/kerberos-io/etcher/releases/download/v1.5.70/kerberosio-etcher-electron-1.5.70.x86_64.rpm | |
sudo dnf install -y pv hdparm unzip | |
curl -LO https://github.com/hypriot/flash/releases/download/2.7.0/flash | |
sudo mv flash /usr/local/bin/flash | |
chmod +x /usr/local/bin/flash | |
flash \ | |
--hostname blb-ab-rp \ | |
--device /dev/sdd \ | |
--force \ | |
https://github.com/kerberos-io/kios/releases/download/v2.8.0/kios-raspberrypi4-2.8.0.img.gz | |
ip=192.168.0.106 | |
# set root password | |
echo password=$(pass bearslairs/root@blb-ab-rp) | ssh root@${ip} 'cat > /data/etc/kios.conf' | |
# set ssh authorized keys | |
cat ~/.ssh/id_rsa.pub | ssh root@${ip} 'cat > /data/etc/ssh_authorized_keys' | |
# disable login for accounts without passwords and disable password authentication | |
curl -sL https://gist.github.com/grenade/ec1e657ae52392756e7ff1827daa68d1/raw/sshd_config?$(uuidgen) | ssh root@${ip} 'mount -o remount, rw / && cat > /etc/sshd_config' | |
# reboot raspberry pi | |
ssh root@${ip} 'reboot' | |
# https://dashboard.balena-cloud.com/fleets/1812277/devices | |
sudo flash --hostname blb-approach ~/bearslairs/balena/balena-cloud-bearslairs-raspberrypi4-64-2.83.10+rev1-v12.9.3.img.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- | |
name: approach | |
stream: rtsp://admin:[email protected]:554 | |
- | |
name: deck | |
stream: rtsp://admin:[email protected]:554 | |
- | |
name: ab | |
stream: rtsp://raspi:[email protected]:554//h264Preview_01_main | |
- | |
name: cd | |
stream: rtsp://raspi:[email protected]:554//h264Preview_01_main | |
- | |
name: em | |
stream: rtsp://raspi:[email protected]:554//h264Preview_01_main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Port 22 | |
ListenAddress 0.0.0.0 | |
HostKey /data/etc/ssh_host_rsa_key | |
HostKey /data/etc/ssh_host_dsa_key | |
HostKey /data/etc/ssh_host_ecdsa_key | |
HostKey /data/etc/ssh_host_ed25519_key | |
PermitRootLogin yes | |
PermitEmptyPasswords no | |
PasswordAuthentication no | |
UsePAM no | |
ChallengeResponseAuthentication no | |
AuthorizedKeysFile /data/etc/ssh_authorized_keys | |
UseDNS no | |
Banner /var/cache/sshd_banner | |
Subsystem sftp /usr/libexec/sftp-server | |
IPQoS cs0 cs0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment