TISbackup/libtisbackup
k3nny 2533b56549 feat(security): modernize SSH key algorithm support with Ed25519
Replace deprecated DSA key support with modern SSH key algorithms,
prioritizing Ed25519 as the most secure option.

Changes:
- Add load_ssh_private_key() helper function in common.py
- Support Ed25519 (preferred), ECDSA, and RSA key types
- Remove deprecated and insecure DSA key support
- Update all SSH key loading across backup drivers:
  * common.py: do_preexec, do_postexec, run_remote_command
  * backup_mysql.py
  * backup_pgsql.py
  * backup_sqlserver.py
  * backup_oracle.py
  * backup_samba4.py
- Add ssh_port parameter to preexec/postexec connections
- Update README.md with SSH key generation instructions
- Document supported algorithms and migration path

Algorithm priority:
1. Ed25519 (most secure, modern, fast, timing-attack resistant)
2. ECDSA (secure, widely supported)
3. RSA (legacy support, requires 2048+ bits)

Security improvements:
- Eliminates vulnerable DSA algorithm (1024-bit limit, FIPS deprecated)
- Prioritizes elliptic curve cryptography (Ed25519, ECDSA)
- Provides clear error messages for unsupported key types
- Maintains backward compatibility with existing RSA keys

Documentation:
- Add SSH key generation examples to README.md
- Update expected directory structure to show Ed25519 keys
- Add migration notes in SECURITY_IMPROVEMENTS.md
- Include key generation commands for all supported types

Breaking change:
- DSA keys are no longer supported and will fail with clear error message
- Users must migrate to Ed25519, ECDSA, or RSA (4096-bit recommended)

Migration:
```bash
# Generate new Ed25519 key
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519

# Copy to remote servers
ssh-copy-id -i ~/.ssh/id_ed25519.pub user@remote
```

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-05 01:39:17 +02:00
..
iniparse fix(tisbackup): fix iniparse wrong check 2025-04-14 23:37:16 +02:00
__init__.py EOF & whitespace 2024-11-29 00:54:09 +01:00
backup_mysql.py feat(security): modernize SSH key algorithm support with Ed25519 2025-10-05 01:39:17 +02:00
backup_null.py fix iniparse 2024-11-29 23:45:40 +01:00
backup_oracle.py feat(security): modernize SSH key algorithm support with Ed25519 2025-10-05 01:39:17 +02:00
backup_pgsql.py feat(security): modernize SSH key algorithm support with Ed25519 2025-10-05 01:39:17 +02:00
backup_rsync_btrfs.py Fix re.compile / re.match warnings 2025-03-07 22:51:20 +01:00
backup_rsync.py Fix re.compile / re.match warnings 2025-03-07 22:51:20 +01:00
backup_samba4.py feat(security): modernize SSH key algorithm support with Ed25519 2025-10-05 01:39:17 +02:00
backup_sqlserver.py feat(security): modernize SSH key algorithm support with Ed25519 2025-10-05 01:39:17 +02:00
backup_switch.py Fix re.compile / re.match warnings 2025-03-07 22:51:20 +01:00
backup_vmdk.py fix iniparse 2024-11-29 23:45:40 +01:00
backup_xcp_metadata.py Fix re.compile / re.match warnings 2025-03-07 22:51:20 +01:00
backup_xva.py fix(security): replace os.popen/os.system with subprocess for command injection prevention 2025-10-05 01:23:53 +02:00
common.py feat(security): modernize SSH key algorithm support with Ed25519 2025-10-05 01:39:17 +02:00
copy_vm_xcp.py fix iniparse 2024-11-29 23:45:40 +01:00
XenAPI.py fix iniparse 2024-11-29 23:45:40 +01:00