Archived
1
0
Fork 0

Better feedback in borg setup script

This commit is contained in:
Casper V. Kristensen 2022-05-10 01:25:49 +02:00
parent 4a3159f69f
commit 4e647cf903

View file

@ -34,9 +34,10 @@ sudo systemctl enable borg-daily.timer
# SSH
ssh-keyscan -t ed25519 -p 222 sigma.caspervk.net | sudo tee /root/.ssh/known_hosts # add backup server to known_hosts
sudo ssh-keygen -t ed25519 # generate key for the root user
echo "Please add the following to ~borg/.ssh/authorized_keys:"
echo "Please add the following to ~borg/.ssh/authorized_keys on the server:"
echo "command=\"mkdir -p ~/repos/$(hostname); cd ~/repos/$(hostname); borg serve --append-only --restrict-to-path ~/repos/$(hostname)\",restrict $(sudo cat /root/.ssh/id_ed25519.pub)"
ssh sigma.caspervk.net -p 222
read -p 'Press any key when done to test the connection.. (should return "PTY allocation request failed on channel 0")'
sudo ssh borg@sigma.caspervk.net -p 222
# To setup the server: