joshuabvarghese commented on code in PR #69191:
URL: https://github.com/apache/airflow/pull/69191#discussion_r3556530278
##########
providers/ssh/src/airflow/providers/ssh/hooks/ssh.py:
##########
@@ -88,16 +88,16 @@ class SSHHook(BaseHook):
"""
# List of classes to try loading private keys as, ordered (roughly) by
most common to least common
+ # Note: DSSKey (DSA) support was removed in paramiko 4.0+, so it is no
longer offered here.
+ # Users relying on DSA keys must migrate to RSA, ECDSA, or Ed25519 keys.
_pkey_loaders: Sequence[type[paramiko.PKey]] = (
paramiko.RSAKey,
paramiko.ECDSAKey,
paramiko.Ed25519Key,
- paramiko.DSSKey,
)
_host_key_mappings = {
"rsa": paramiko.RSAKey,
- "dss": paramiko.DSSKey,
Review Comment:
Thanks for catching this, @nailo2c you're right, the host_key lookup would
have hit a bare KeyError for anyone with an ssh-dss host key configured. Good
catch.
Looking at this more, I noticed #69669 also addresses this issue and goes
further — it fixes the equivalent regression in the SFTP hook too (which mine
doesn't touch), handles more host key type variants (ecdsa-sha2-nistp*, legacy
ssh-ecdsa, whitespace/tab-separated formats), and caps the paramiko version
bound more carefully.
I'll close this one in favor of that PR rather than duplicate effort. Thanks
again for the review!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]