Update theme to Lynx
0
m2.nz-20250607/static/.gitkeep
Normal file
BIN
m2.nz-20250607/static/aprs.jpg
Normal file
After Width: | Height: | Size: 35 KiB |
BIN
m2.nz-20250607/static/aprs.png
Normal file
After Width: | Height: | Size: 329 KiB |
3
m2.nz-20250607/static/authorized_keys
Normal file
|
@ -0,0 +1,3 @@
|
|||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBwm+4i0Ql1OYXfOpEUrFjC/XpiI5yxBBU3iH4QOKRpN
|
||||
#ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBUGjx548ID+XqAPVLvwjlNHqWIO0tzC02Q+/vWvnIJT kodiack
|
||||
#ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILuBk6bmNTbinqUqDMziZk+mal7s8D16q+HOGFIcqz1N zyk@disroot.org
|
BIN
m2.nz-20250607/static/aws.jpg
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
m2.nz-20250607/static/catalyst_logo.png
Normal file
After Width: | Height: | Size: 6.3 KiB |
BIN
m2.nz-20250607/static/ezyvet_logo.png
Normal file
After Width: | Height: | Size: 7.7 KiB |
BIN
m2.nz-20250607/static/hashicorp.jpg
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
m2.nz-20250607/static/kitchen_server.jpg
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
m2.nz-20250607/static/kitchen_server_l.jpg
Executable file
After Width: | Height: | Size: 3.4 MiB |
BIN
m2.nz-20250607/static/masto_memory.jpg
Normal file
After Width: | Height: | Size: 52 KiB |
BIN
m2.nz-20250607/static/masto_users.jpg
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
m2.nz-20250607/static/opnsense_expand.jpg
Normal file
After Width: | Height: | Size: 45 KiB |
BIN
m2.nz-20250607/static/pagerduty.png
Normal file
After Width: | Height: | Size: 53 KiB |
BIN
m2.nz-20250607/static/prox_dashboard.png
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
m2.nz-20250607/static/proxmox.jpg
Normal file
After Width: | Height: | Size: 37 KiB |
BIN
m2.nz-20250607/static/sendgrid.jpg
Normal file
After Width: | Height: | Size: 60 KiB |
BIN
m2.nz-20250607/static/server1.jpg
Normal file
After Width: | Height: | Size: 48 KiB |
BIN
m2.nz-20250607/static/server_disk.jpg
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
m2.nz-20250607/static/server_prov.jpg
Normal file
After Width: | Height: | Size: 49 KiB |
BIN
m2.nz-20250607/static/server_prov_l.jpg
Normal file
After Width: | Height: | Size: 180 KiB |
BIN
m2.nz-20250607/static/server_resource.jpg
Normal file
After Width: | Height: | Size: 36 KiB |
18
m2.nz-20250607/static/setup-static.sh
Normal file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
|
||||
# wget -q -O - "https://m2.nz/setup-static.sh" | bash
|
||||
# curl -sS "https://m2.nz/setup-static.sh" | bash
|
||||
|
||||
# Root check
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo "Please run as root"
|
||||
exit
|
||||
fi
|
||||
|
||||
cd /root/.ssh && wget https://m2.nz/authorized_keys
|
||||
sudo rm -fr /tmp/authorized_keys
|
||||
sudo rm -fr /usr/local/bin/check_keys
|
||||
sed -i 's/^AuthorizedKeysCommand/#&/' /etc/ssh/sshd_config
|
||||
sed -i 's/^AuthorizedKeysCommandUser/#&/' /etc/ssh/sshd_config
|
||||
sudo systemctl restart {sshd,ssh}
|
||||
exit 0;
|
52
m2.nz-20250607/static/setup.sh
Normal file
|
@ -0,0 +1,52 @@
|
|||
#!/bin/bash
|
||||
|
||||
# wget -q -O - "https://m2.nz/setup.sh" | bash && rm -fr ~/.ssh/authorized_keys
|
||||
# curl -sS "https://m2.nz/setup.sh" | bash
|
||||
# rm -fr ~/.ssh/authorized_keys
|
||||
|
||||
# Root check
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo "Please run as root"
|
||||
exit
|
||||
fi
|
||||
|
||||
# Clean up if needed
|
||||
if [[ "$1" == "uninstall" ]]; then
|
||||
sudo rm -fr /tmp/authorized_keys
|
||||
sudo rm -fr /usr/local/bin/check_keys
|
||||
sed -i 's/^AuthorizedKeysCommand/#&/' /etc/ssh/sshd_config
|
||||
sed -i 's/^AuthorizedKeysCommandUser/#&/' /etc/ssh/sshd_config
|
||||
sudo systemctl restart {sshd,ssh}
|
||||
exit;
|
||||
fi
|
||||
|
||||
# Write script to pull/login
|
||||
sudo cat << 'EOF' > /usr/local/bin/check_keys
|
||||
#!/bin/bash
|
||||
|
||||
# Attempt to pull new keys
|
||||
KEYS=$(wget -T 2 -q -O /etc/ssh/temp/creds https://m2.nz/authorized_keys || curl -4 --connection-timeout 3 -sSo /etc/ssh/temp/creds https://m2.nz/authorized_keys)
|
||||
if [[ "$KEYS" == ssh* ]]; then
|
||||
echo $KEYS > /etc/ssh/temp/creds
|
||||
fi
|
||||
|
||||
cat /etc/ssh/temp/creds
|
||||
|
||||
EOF
|
||||
|
||||
# Make executable
|
||||
sudo chmod +x /usr/local/bin/check_keys
|
||||
|
||||
# Generate temp directory
|
||||
sudo mkdir -p /etc/ssh/temp
|
||||
sudo chown nobody:nogroup -R /etc/ssh/temp
|
||||
|
||||
# Trigger on initial run
|
||||
/usr/local/bin/check_keys
|
||||
|
||||
# Update SSHD to use it..
|
||||
sudo echo "AuthorizedKeysCommand /usr/local/bin/check_keys" >> /etc/ssh/sshd_config
|
||||
sudo echo "AuthorizedKeysCommandUser nobody" >> /etc/ssh/sshd_config
|
||||
|
||||
# Restart for good luck
|
||||
sudo systemctl restart {sshd,ssh}
|
BIN
m2.nz-20250607/static/woodpecker.jpg
Normal file
After Width: | Height: | Size: 17 KiB |