Better feedback in borg setup script
This commit is contained in:
parent
4a3159f69f
commit
4e647cf903
|
@ -34,9 +34,10 @@ sudo systemctl enable borg-daily.timer
|
||||||
# SSH
|
# SSH
|
||||||
ssh-keyscan -t ed25519 -p 222 sigma.caspervk.net | sudo tee /root/.ssh/known_hosts # add backup server to known_hosts
|
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
|
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)"
|
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:
|
# To setup the server:
|
||||||
|
|
Reference in a new issue