Repository navigation
Allow addition of HostKeyEntrys to HostKeys - #2181
daemcnally wants to merge 3 commits into
Conversation
|
Interesting, so this is refactoring existing behavior to expose it for direct usage? |
|
Also, as this is key-related, flagging for possible relevance to the overall key/auth overhaul of #387 |
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. |
|
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? |
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 .