I have set up Borg about a year ago, with the same error and could not really get it working. A couple of weeks ago I tried again, and it worked directly (but I changed the installation since)
Maybe one time I first installed the server and then the client, and the other time first the cilent and then the server. I can’t remember, and have no idea why it works now.
That is something you can check. Are you OK with using SSH? You could install “Shell in a box” if you don’t have a program for SSH on your computer/telephone.
I can only help you in troubleshooting, my first try did not work, the second time worked without a problem, and now I changed it again so I can’t peek at the correct installation
Do you remember the user you let Borg Server create? I’ll use ‘queen’ in the example.
Log in with
ssh firstname.lastname@example.org, providing your admin password. I think borg runs as root. To check whether there is a key available,
$ sudo su - # change to root.
# ls /root/.ssh # list contents of root's ssh dir
# # probably there is nothing, at the moment
A couple of files are often found in the ssh-dir:
- known_hosts: those hosts have been visited before, or their info is added
- authorized_keys: users identified by this key have access
- id_rsa: private RSA-key
- id_rsa.pub: public RSA-key
- id_ecdsa: private ECDSA-key
- id_ecdsa.pub: public ECDSA-key
RSA-keys are the default when generating a new key. Borg seems to use ECDSA-keys. For one reason or another, the key is not generated while installing the borg-app, or, if it is created but there is an RSA key as well, it does not select the right key.
Log in again, or if you’re still logged in, continue (as root)
# ssh-keygen -t ecdsa # and then type 'enter' a few times, accepting the defaults
# ssh-copy-id email@example.com # copy the _public_ key (it will automatically take the public key, it is safe to give to anyone _but don't give the private key_)
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_ecdsa.pub"
The authenticity of host 'red.machine.yh (ip)' can't be established.
ECDSA key fingerprint is SHA256:/VuUao.iXNG48htJpfy5U36lGAZR5bPwnaRzQao92ee.
Are you sure you want to continue connecting (yes/no)? yes
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
Debian GNU/Linux 10
Number of key(s) added: 1
Now try logging into the machine, with: "ssh 'firstname.lastname@example.org'"
and check to make sure that only the key(s) you wanted were added.
# ssh email@example.com
Debian GNU/Linux 10
firstname.lastname@example.org$ # you could log in, so can Borg
Ok, you enabled and checked that root@blue can log in as queen@red, doing so using the ecdsa-key.
Now, if you try installing the Borg-client-app again on blue, does it work?
Probably things go different on your side halfway the story, let’s see how things go!