20 lines
537 B
Bash
Raw Normal View History

2022-02-12 23:11:35 +02:00
#!/bin/sh
user_authorized_keys_file="/mnt/data/ssh/authorized_keys"
2022-06-21 15:11:25 +03:00
curl -O https://raw.githubusercontent.com/fire1ce/UDM-Persistent-SSH-Keys/main/install.sh
2022-02-12 23:11:35 +02:00
mv 99-ssh-keys.sh /mnt/data/on_boot.d/99-ssh-keys.sh
chmod +x /mnt/data/on_boot.d/99-ssh-keys.sh
2022-02-12 23:14:24 +02:00
echo "99-ssh-keys.sh installed"
2022-02-12 23:11:35 +02:00
if [ ! -f "$user_authorized_keys_file" ]; then
touch $user_authorized_keys_file
2022-02-12 23:14:24 +02:00
echo "Creating $user_authorized_keys_file"
2022-02-12 23:11:35 +02:00
fi
chmod 0644 $user_authorized_keys_file
2022-02-12 23:14:24 +02:00
echo "Add you public keys to $user_authorized_keys_file"
echo "done."
2022-02-12 23:11:35 +02:00
exit 0