You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pyinfra creates duplicate entries in ~/.ssh/known_hosts when unable to connect.
To Reproduce
$ cat ~/.ssh/known_hosts
@cert-authority *.internal.example.com ssh-ed25519 <key> <comment>
$ pyinfra $host exec -- echo "hello world"
--> Loading config...
--> Loading inventory...
--> Connecting to hosts...
Failed to load host keys from /Users/<user>/.ssh/known_hosts: ('@cert-authority *.internal.example.com ssh-ed25519 <key> <comment>', Error('Incorrect padding'))
No host key for <host> found in known_hosts, accepting & adding to host keys file
Added host key for <host> to known_hosts
[<host>] Authentication error () (Authentication failed.)
--> Disconnecting from hosts...
--> pyinfra error: No hosts remaining!
$ pyinfra $host exec -- echo "hello world"
<same output>
$ pyinfra $host exec -- echo "hello world"
<same output>
$ cat ~/.ssh/known_hosts
@cert-authority *.internal.example.com ssh-ed25519 <key> <comment>
<host> ssh-ed25519 <key>
<host> ssh-ed25519 <key>
<host> ssh-ed25519 <key>
Expected behavior
Pyinfra should only add the key once. This is likely an edge case related to #1209, I ran into this while using pyinfra to inspect a server that was not yet signed by the CA.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
Pyinfra creates duplicate entries in
~/.ssh/known_hosts
when unable to connect.To Reproduce
Expected behavior
Pyinfra should only add the key once. This is likely an edge case related to #1209, I ran into this while using pyinfra to inspect a server that was not yet signed by the CA.
The text was updated successfully, but these errors were encountered: