Remove DSS key support from SSH provider for Paramiko 4#69669
Merged
eladkal merged 7 commits intoJul 10, 2026
Conversation
Paramiko 4 removed DSS/DSA key handling, so the SSH provider needs to stop loading or documenting those keys while giving users a clear migration path.\n\nThis also teaches host_key parsing to understand real OpenSSH known_hosts key type tokens for RSA, ECDSA, and Ed25519 values.
eladkal
approved these changes
Jul 9, 2026
Drop trailing comments from typed SSH/SFTP host_key values so pasted .pub lines like ssh-ed25519 <key> user@host keep working. Align async SFTP host-key parsing with async SSH by stripping values and rejecting ssh-dss.
This was referenced Jul 10, 2026
This was referenced Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
This bumps the SSH/SFTP provider Paramiko dependency to Paramiko 4.x and removes Airflow's remaining DSS/DSA key handling paths.
Changes:
paramiko.DSSKeyfrom SSH private-key loadingssh-dsshost keys with a clear migration errorknown_hostshost-key tokens:ssh-rsaecdsa-sha2-nistp256ecdsa-sha2-nistp384ecdsa-sha2-nistp521ssh-ed25519host_keyvalues as RSA for backward compatibility<5.0.0because Paramiko 5 currently breaks existing SSH hook RSA private-key testsWhy
Paramiko 4 removed DSS/DSA support. Airflow was still referencing
paramiko.DSSKey, which blocks moving the SSH/SFTP providers to Paramiko 4.This also avoids a host-key regression: users with a configured
ssh-dsshost key now get an explicit migration error instead of a rawKeyError, and ECDSAknown_hostsvalues such asecdsa-sha2-nistp256 ...are parsed withparamiko.ECDSAKeyinstead of falling through to RSA parsing.Tests
uv run ruff format providers/ssh/src/airflow/providers/ssh/hooks/ssh.py providers/ssh/tests/unit/ssh/hooks/test_ssh.py uv run ruff check --fix providers/ssh/src/airflow/providers/ssh/hooks/ssh.py providers/ssh/tests/unit/ssh/hooks/test_ssh.py uv run --frozen pytest providers/ssh/tests/unit/ssh/hooks/test_ssh.py -q -k 'host_key or dss or unsupported'Result:
Also ran file-scoped
prekvalidation. All applicable checks passed exceptUpdate providers build files, which could not run because Docker was not running locally.Closes: #54079