Commit d21aa77
Fixes #38425 - Make prune_known_hosts work on ed25519 keys
Currently, prune_known_hosts does not work on ed25519 type SSH keys.
This causes issues for example when rebuilding a provisioned host with
the same ip address that uses ed25519 type keys. The rex jobs run on the
host fail becase of a conflicting ssh key in the known_hosts smart proxy
file. Normally, prune_known_hosts method is expected to take of such
keys.
prune_known_hosts uses the KnownHosts.search_for method from the net-ssh
gem to find the associated keys. While ssh-ed25519 is among the
supported types, for the method to process these keys additional gems
need to be present. You can confirm this by examining the links below
which point to the relevant parts of code in net-ssh. With the inclusion
of new gems the issue is no longer present.
[1]: https://github.com/net-ssh/net-ssh/blob/d9549e4226dc3aed12efcca24a8b6d349143f398/lib/net/ssh/known_hosts.rb#L106
[2]: https://github.com/net-ssh/net-ssh/blob/d9549e4226dc3aed12efcca24a8b6d349143f398/lib/net/ssh/authentication/ed25519_loader.rb1 parent ced5e82 commit d21aa77
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| |||
0 commit comments