Skip to content

Adjust user sftp examples to rely on known hosts file rather than insecure policy to auto add missing host keys#523

Merged
jonasbardino merged 8 commits intonextfrom
adjust/user-sftp-examples-to-rely-on-known-hosts-file-rather-than-insecure-auto-add
Apr 24, 2026
Merged

Adjust user sftp examples to rely on known hosts file rather than insecure policy to auto add missing host keys#523
jonasbardino merged 8 commits intonextfrom
adjust/user-sftp-examples-to-rely-on-known-hosts-file-rather-than-insecure-auto-add

Conversation

@jonasbardino
Copy link
Copy Markdown
Contributor

@jonasbardino jonasbardino commented Apr 20, 2026

Nothing critical as it's client side examples for programmatic SFTP access with paramiko, but addresses some warnings from repo code scans.
One can simply run the corresponding sftp FQDN command first to inject any missing host keys. Preferably with the VerifyHostKeyDNS yes option set to grab the trusted public key from DNSSEC.

@jonasbardino jonasbardino self-assigned this Apr 20, 2026
@jonasbardino jonasbardino added the enhancement New feature or request label Apr 20, 2026
@jonasbardino jonasbardino marked this pull request as ready for review April 20, 2026 16:44
@jonasbardino jonasbardino requested a review from a team April 20, 2026 16:44
Comment thread mig/user/migsftpbench.py
Comment thread mig/user/migsftpbench.py
Copy link
Copy Markdown
Contributor

@Martin-Rehr Martin-Rehr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should migsftpaccess.py also have support for Ed25519 host keys
like migsftp.py ?

@jonasbardino
Copy link
Copy Markdown
Contributor Author

Should migsftpaccess.py also have support for Ed25519 host keys like migsftp.py ?

Yes, good point. Added now.

@jonasbardino jonasbardino force-pushed the adjust/user-sftp-examples-to-rely-on-known-hosts-file-rather-than-insecure-auto-add branch from a7c9ccd to 5f187f9 Compare April 24, 2026 06:35
Comment thread mig/user/migsftp.py Outdated
Copy link
Copy Markdown
Contributor

@Martin-Rehr Martin-Rehr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved when comment is addressed

…file

rather than the insecure policy to auto add missing host keys.
Update inline documentation to fit command line arguments.
…e insecure

policy of auto adding missing host keys. A few fixes including a byte vs str
issue to make it functional again on python3. Update inline usage help to fit
comand line parsing and allow prompting for usernames.
…e insecure

policy of auto adding missing host keys. A few other fixes to work under
python3. Sync command line args with migsftp.py for consistency.
Allow sharelinks of 10 chars in migsftp.py, too.
…efault and

only the provided host key if one is explicitly given on command line.
@jonasbardino jonasbardino force-pushed the adjust/user-sftp-examples-to-rely-on-known-hosts-file-rather-than-insecure-auto-add branch from 5f187f9 to 00a1f52 Compare April 24, 2026 08:22
@jonasbardino jonasbardino merged commit 415e11a into next Apr 24, 2026
11 checks passed
@jonasbardino jonasbardino deleted the adjust/user-sftp-examples-to-rely-on-known-hosts-file-rather-than-insecure-auto-add branch April 24, 2026 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants