vorta icon indicating copy to clipboard operation
vorta copied to clipboard

check if ssh agent actually provides requested key if it is password protected

Open renner0e opened this issue 1 year ago • 1 comments

The problem

I use password protected ssh key files with vorta. I use keepassxc as my ssh-agent. So when I unlock my database only then my SSH keys can actually be used.

When the server is reachable but the SSH key is not unlocked then vorta gives this error: ERROR - Connection closed by remote host. Is borg working on the server?

So when I boot up my PC (Vorta is in autostart and is set to Backup Daily and runs missed updates) Vorta immediately wants to run backups. I have no time to unlock my database before Vorta runs.

This would be very convenient as I would probably never have to run a manual backup again.

Requested Solution

Add an option to configure either on a per repo/key basis to check if the ssh agent has that requested key in it and if does, run the backup. If not, try it again if the key is available later -> Error if certain threshold/max tries is passed.

Vorta checks in the background when the SSH agent provides the key for the missed backup?

Alternatives

A delay after autostart would probably also work but is certainly not ideal.

I could probably get the borg command from vorta logs and use a systemd timer/cron/whatever and another script that checks which ssh keys are in the agent but I'd have to update the script each time I change some option in vorta.

I want to avoid using non protected SSH keys.

Additional context

Fedora Linux 41 Vorta Flatpak from flathub

renner0e avatar Nov 19 '24 23:11 renner0e

Related: #2133

m3nu avatar Nov 20 '24 06:11 m3nu