Skip to content

Allow addition of HostKeyEntrys to HostKeys - #2181

Open
daemcnally wants to merge 3 commits into
paramiko:mainfrom
daemcnally:main
Open

daemcnally wants to merge 3 commits into
paramiko:mainfrom
daemcnally:main

Conversation

@daemcnally

Copy link
Copy Markdown

To address #1134.

This also allows users to add their own file parsing behaviour. For example if the user wishes to ignore lines that raise InvalidHostKeyErrors .

@bskinn

bskinn commented Feb 6, 2023

Copy link
Copy Markdown
Contributor

Interesting, so this is refactoring existing behavior to expose it for direct usage?

@bskinn bskinn added the Keys label Feb 6, 2023
@bskinn

bskinn commented Feb 6, 2023

Copy link
Copy Markdown
Contributor

Also, as this is key-related, flagging for possible relevance to the overall key/auth overhaul of #387

@daemcnally

Copy link
Copy Markdown
Author

Interesting, so this is refactoring existing behavior to expose it for direct usage?

Yes that's right, the purpose I wanted to use it for was reading a host key file but ignoring any keys that were invalid rather than raising an exception. This meant that I needed to read the file line by line, and it was annoying having a method to generate a host key entry but not to be able to add it in to the map.

@destroyer5656

Copy link
Copy Markdown

I have been having an issue where I regenerate host keys every boot during a test and paramiko faults because it can't handle having a different hostkey with the same hostname. Could I use this function to ignore that check?

@bskinn bskinn added the Feature request eval needed Triage -> maintainer signal label Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants