mise au point atelier borg
This commit is contained in:
24
solution.md
Normal file
24
solution.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# serveur reception 100.0.8.1
|
||||
|
||||
```bash
|
||||
useradd -d /home/borg -m -s /bin/bash borg
|
||||
echo borg:123Soleil | chpasswd
|
||||
```
|
||||
|
||||
contenu de ~borg/.ssh/authorized_keys:
|
||||
|
||||
```txt
|
||||
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
|
||||
|
||||
```bash
|
||||
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
|
||||
```
|
||||
Reference in New Issue
Block a user