Fix SSH key loading for ed25519 and ECDSA keys

Unencrypted ed25519 and ECDSA keys crashed with an uncaught
SSHException, and the DSA fallback raised NameError since paramiko 4
removed DSSKey. Load the key with paramiko.PKey.from_path instead,
ask for the passphrase only when the key is encrypted, and log an
error instead of crashing when the key can't be loaded.

Require paramiko >= 3.2 for PKey.from_path.
This commit is contained in:
Fuxino
2026-10-08 20:06:57 +02:00
parent 2f207efcf9
commit 0671f86579
2 changed files with 34 additions and 42 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ classifiers = [
[project.optional-dependencies]
JOURNAL = ["systemd-python"]
NOTIFICATIONS = ["dbus-python"]
REMOTE = ["paramiko"]
REMOTE = ["paramiko>=3.2"]
[project.urls]
Homepage = "https://git.shouldnt.work/fuxino/simple_backup"