Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require net-ssh ~> 7.0 for SHA-2 support #203

Merged
merged 1 commit into from
Apr 11, 2023
Merged

Conversation

matharvard
Copy link
Contributor

This PR adds a version requirement for the net-ssh gem of ~> 7.0.

Versions of net-ssh prior to 7 do not support the SHA-2 algorithm for RSA client authentication (see https://github.com/net-ssh/net-ssh/blob/master/CHANGES.txt#L21), which will prevent mrsk from connecting to host machines using those keys. In some cases this presented as mrsk being unable to acquire a lock, and in others it was an authentication failure (depending on whether mrsk was trying to execute a command or acquire a lock for further work).

mrsk already requires sshkit, which has a version requirement of net-ssh >= 2.8.0. In many cases, this works well, as the latest version of net-ssh would likely get installed anyway. In some cases where an application uses net-ssh and specifies its own version requirement of >= 2.8.0 and < 7, and uses a SHA-2 key to connect to the host, both mrsk and sshkit would be fine (the bundle version requirements would all succeed), but net-ssh would fail to open a connection and mrsk would fail with one of the issues above.

Please let me know if there's anything else I can do for this PR!

Fixes #180.

Versions of net-ssh before 7.0 do not support the SHA-2 algorithm and result in mrsk not being able to connect to hosts using keys generated with it. net-ssh is also a dependency of sshkit, however, sshkit has a version requirement of >= 2.8.0 for net-ssh, so is not effective at ensuring mrsk has the version it needs to be the most compatible.
@dhh dhh merged commit ac37714 into basecamp:main Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mrsk fails to connect to servers when net-ssh is < 7.x
2 participants