theforeman / hammer-cli-foreman-ssh

Adds Remote SSH support for Hammer Foreman CLI
Other
7 stars 6 forks source link

Net::SSH::HostKeyMismatch with cert based host auth #10

Open thomas-merz opened 1 year ago

thomas-merz commented 1 year ago
/Users/Thomas.Merz/.rvm/gems/ruby-2.7.6/gems/net-ssh-multi-1.2.1/lib/net/ssh/multi/pending_connection.rb:29:in `replay_on': undefined method `open_channel' for nil:NilClass (NoMethodError)
error connecting to admin@example.com: Net::SSH::HostKeyMismatch (fingerprint SHA256:xxxxx does not match for "example.com,172.12.34.56")

This has already been fixed in https://github.com/net-ssh/net-ssh/issues/613 but hammer host ssh doesn't honor this fix from August 2021 because there has been no updated build since April 2015. So please check this out and give us a newer version on https://rubygems.org/gems/hammer_cli_foreman_ssh

thomas-merz commented 4 months ago

Hey @dgoetz , can you help to give us Foremen a newer hammer version that doesn't have this issue, so that one can use it anymore because it's broken with more and more hosts over time 😞

dgoetz commented 4 months ago

No, this needs a new gem release. @ofedoren seems to be the only still active Foreman developer who contributed here, so I hope he can do a gem release, then I will pick it up for packaging on all supported versions.

ekohl commented 4 months ago

@thomas-merz a new release of this gem won't solve it.

Stack trace wise it points to: https://github.com/net-ssh/net-ssh-multi/blob/f4c787ef3770f5218fefcb3c21091de13205ede8/lib/net/ssh/multi/pending_connection.rb#L29

So somehow session is nil there. This could very well be a bug in net-ssh-multi, but it's hard to say.

https://github.com/net-ssh/net-ssh-multi doesn't look maintained, so that could be a problem.

thomas-merz commented 4 months ago

Uh, yes, I can see my very old issue from 2022 over there 😞