bordaigorl / remy

Remy, an online&offline manager for the reMarkable tablet
GNU General Public License v3.0
282 stars 13 forks source link

rsync does not work after adding new key #44

Open pchampin opened 2 years ago

pchampin commented 2 years ago

When the Remarkable tablet is updated, the SSH server has a new key, which requires to update the known_hosts file on the client side.

Remy offers several options, the first one being, IIUC, to add a known_hosts file in ~/.config/remy, and use that one for SSH connection.

The problem is: once that is done, my rsync based config does not work anymore, because while Remy manages to SSH to the Remarkable, the subsequent rsync does not.

If there is a way to configure rsync to use ~/.config/remy/known_hosts instead of the default one, it should be used. Otherwise, the option to automatically add the new ket should have a big red warning "this will break your rsync based configs".

bordaigorl commented 2 years ago

Very good point! I'll think of a fix

bordaigorl commented 2 years ago

Actually: this should not be happening! The known_hosts file used for ssh connection should be the same used for invoking rsync. Can you set "log_verbosity": "debug" in your config and check what the log says about known_hosts?

bordaigorl commented 2 years ago

For example: if you set the known_hosts setting in the source you are using, Remy would always try to use that one, regardless of the existence of the Remy-specific one.

pchampin commented 2 years ago

Actually: this should not be happening!

Strange. Maybe I misdiagnosed the problem, sorry about that.

I can't reproduce the bug right now because I have updated by ~/.ssh/known_hosts in order to fix the problem. I tried to restore the old one, but this give me very strange behaviors, that I couldn't make sense of...

I did add "log_verbosity": "debug" to my config. On the next update, I will try to monitor carefully what happens, and keep the logs.