2022-02-12 23:11:35 +02:00
# UDMP Persistence SSH Keys
## Persistence on Reboot
2022-02-13 00:39:37 +02:00
This script need to run every time the system is rebooted since the __ /root/.ssh/authorized_keys__ overwrites every boot.
2022-02-12 23:38:30 +02:00
This can be accomplished with a boot script. Flow this guide: [UDM / UDMPro Boot Script ](https://github.com/boostchicken-dev/udm-utilities/tree/master/on-boot-script )
2022-02-12 23:14:24 +02:00
2022-02-12 23:25:15 +02:00
## Compatibility
* Tested on UDM PRO
* UDM Pro doesn't support __ed25519__ SSH Keys
2022-02-12 23:14:24 +02:00
## Installation
2022-02-12 23:25:15 +02:00
The script was tested on UDM PRO
```bash
curl https://raw.githubusercontent.com/fire1ce/UDMP-Persistence-SSH-Keys/main/install.sh | bash
```
Add you public RSA keys to:
```bash
/mnt/data/ssh/authorized_keys
```
## Uninstall
Delete the 99-ssh-keys.sh file
```bash
2022-02-12 23:28:33 +02:00
rm -rf /mnt/data/on_boot.d/99-ssh-keys.sh
2022-02-12 23:25:15 +02:00
```
Delete your authorized_keys file
```bash
rm -rf /mnt/data/ssh/authorized_keys
```
## Usage
At boot the script with read the __ /mnt/data/ssh/authorized_keys__ file and add the content to UDM's __ /root/.ssh/authorized_keys__
2022-02-12 23:14:24 +02:00
2022-02-12 23:25:15 +02:00
Manual run:
2022-02-12 23:14:24 +02:00
```bash
2022-02-12 23:25:15 +02:00
/mnt/data/on_boot.d/99-ssh-keys.sh
```