Skip to content

feat: add --ssh-private-key arg for custom SSH key authentication#315

Merged
abbbi merged 1 commit into
abbbi:masterfrom
fuleinist:feat/ssh-private-key
May 30, 2026
Merged

feat: add --ssh-private-key arg for custom SSH key authentication#315
abbbi merged 1 commit into
abbbi:masterfrom
fuleinist:feat/ssh-private-key

Conversation

@fuleinist

Copy link
Copy Markdown
Contributor

Summary

Adds --ssh-private-key argument (equivalent to ssh -i) to allow users to specify a custom private key file for SSH authentication when performing remote backups.

Changes

  • argopt.py: Added --ssh-private-key argument to the remote backup options group
  • ssh/client.py: Modified SSHClient.connect() to accept key_filename parameter, which is passed to paramiko's SSHClient.connect() only when specified
  • common.py: Updated sshSession() to pass ssh_private_key from args to the SSH client constructor

Use case

Users with custom SSH keys stored on encrypted storage (as described in #311) can now run:

virtnbdbackup --ssh-private-key /path/to/custom/key ...```

Closes #311

Adds --ssh-private-key argument (equivalent to ssh -i) to allow users to
specify a custom private key file for SSH authentication when performing
remote backups. The key is passed to paramiko's SSHClient.connect() via
the key_filename parameter.

Addresses: abbbi#311
@abbbi abbbi merged commit 325ecce into abbbi:master May 30, 2026
4 of 5 checks passed
@abbbi

abbbi commented May 30, 2026

Copy link
Copy Markdown
Owner

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants