Skip to content

Commit d21aa77

Browse files
adamlazik1adamruzicka
authored andcommitted
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.rb
1 parent ced5e82 commit d21aa77

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

smart_proxy_remote_execution_ssh.gemspec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ Gem::Specification.new do |gem|
3030
gem.add_development_dependency('rack-test', '~> 0')
3131
gem.add_development_dependency('rubocop', '~> 0.82.0')
3232

33+
gem.add_runtime_dependency('ed25519', '>= 1.2', '< 2.0')
34+
gem.add_runtime_dependency('bcrypt_pbkdf', '>= 1.0', '< 2.0')
3335
gem.add_runtime_dependency('smart_proxy_dynflow', '~> 0.9', '>= 0.9.4')
3436
gem.add_runtime_dependency('net-ssh', '~> 7.2')
3537
gem.add_runtime_dependency('mqtt', '~> 0.5')

0 commit comments

Comments
 (0)