Files
tp_backup/solution.md

1.1 KiB

serveur reception 100.0.8.1

useradd -d /home/borg -m -s /bin/bash borg
echo borg:123Soleil | chpasswd

contenu de ~borg/.ssh/authorized_keys:

from="100.0.8.22",command="borg serve --restrict-to-path /home/borg/" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICZH4GD9hPLi499S5GYnXLi5CsAFu19f79QaE3cB34n6 root@SUB2-22

serveur emetteur 100.0.8.22

sudo ssh-keygen -t ed25519 -f /root/.ssh/id_ed25519_borg
sudo ssh-copy-id -i /root/.ssh/id_ed25519_borg borg@100.0.8.1
sudo BORG_PASSPHRASE=123Soleil BORG_RSH='ssh -i ~root/.ssh/id_ed25519_borg' borg init  --encryption repokey ssh://borg@100.0.8.1/home/borg/22
sudo BORG_PASSPHRASE=123Soleil BORG_RSH='ssh -i ~root/.ssh/id_ed25519_borg' borg create  ssh://borg@100.0.8.1/home/borg/22::$(date -Imin)_home /home
sudo BORG_PASSPHRASE=123Soleil BORG_RSH='ssh -i ~root/.ssh/id_ed25519_borg' borg list  ssh://borg@100.0.8.1/home/borg/22
sudo BORG_PASSPHRASE=123Soleil BORG_RSH='ssh -i ~root/.ssh/id_ed25519_borg' borg list  ssh://borg@100.0.8.1/home/borg/22::$(date -Imin)_home /home
BORG_PASSPHRASE=123Soleil BORG_RSH='ssh -i ~root/.ssh/id_ed25519_borg' borg key export ssh://borg@100.0.8.1/home/borg/22