ashemsay / restic_ynh

A Restic package for YunoHost
GNU Affero General Public License v3.0
3 stars 9 forks source link

Backup failed #3

Closed KvL159 closed 3 years ago

KvL159 commented 3 years ago

I tried to setup this package, I get the following error after starting the service :

Fatal: unable to open repo at sftp:***:.***: unable to start the sftp session, error: EOF
Could not run script: /etc/yunohost/hooks.d/backup_method/05-restic_app
Custom backup method could not get past the 'backup' step
ashemsay commented 3 years ago

It means your destination server is not properly configured or you are not using the correct info to connect (either username, server address or port). What operating system are you running on destination server and which ssh server are you running?

KvL159 commented 3 years ago

The destination server is a Debian 10 Yunohost 4.X, the port for SSH is 22

Does it need other ports ? The user created need to be in sudo group or standard user is fine ?

Thanks !

KvL159 commented 3 years ago

I was able to make it work on my test server, however, when I try to setup "(Optional) set sftp jail on server B" The server rejects the ssh connection, I have replaced the username but it still doesn't allow to connect to this user.

Any ideas @ashemsay ?

ashemsay commented 3 years ago

You would need to look at your destination server's logs (/var/log/auth.log I would guess) and see why it is refusing your connection. I would guess a typo in the username (you need to replace servera with the correct username).

There's also the fact that the config suggested is valid for a standard debian/ubuntu, maybe there are some parameters set on a yunohost that are incompatible with it.

Either way only checking the ssh server logs will tell you what's wrong.

KvL159 commented 3 years ago

Thank you for the suggestion, it seem the error is there : no matching key exchange method found. Their offer: diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman

Do you know what is the algorythm used by the key generated ?

ashemsay commented 3 years ago

This means that your client (the server on which you installed the restic package) cannot agree with the destination serer on an encryption algorithm. Since your destination server is running debian 10, I would guess that your source server is pretty old? What is strange is that this is only happening when trying the sftp jail. I'm sorry I don't know much about ssh ciphers, I'm afraid I can't help you much more on this issue :(

The whole point of this package was to make things easier without doing much on the target server, it seems this point is totally missed in your case.

KvL159 commented 3 years ago

OK, thank you for your help @ashemsay, I'll try to setup a fresh server and test again