Skip to content

feat(ssh): wire algorithm fields and connect timeout from sshconfig - #366

Merged
kke merged 2 commits into
mainfrom
ssh-config-algorithm-fields
Jun 4, 2026
Merged

kke merged 2 commits into
mainfrom
ssh-config-algorithm-fields

Conversation

@kke

@kke kke commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR wires additional OpenSSH ssh_config-derived settings into the in-process SSH implementation so that rig’s Go SSH client respects more of the user’s SSH configuration.

Changes:

  • Plumbs Ciphers, KexAlgorithms, MACs, and HostKeyAlgorithms from sshconfig into golang.org/x/crypto/ssh.ClientConfig.
  • Introduces use of ConnectTimeout by configuring the TCP dialer timeout.
  • Adds unit tests validating algorithm field wiring and nil/empty behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
protocol/ssh/connection.go Applies ssh_config algorithm preferences to ssh.ClientConfig, gates agent usage based on IdentitiesOnly, and applies ConnectTimeout during dialing.
protocol/ssh/connection_test.go Adds tests covering algorithm-field propagation and nil behavior in clientConfig.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread protocol/ssh/connection.go Resolved
Comment thread protocol/ssh/connection.go Resolved
Comment thread protocol/ssh/connection_test.go Resolved
@kke
kke force-pushed the ssh-config-algorithm-fields branch from edf1944 to d3d1acc Compare June 3, 2026 20:59
@kke
kke requested a review from Copilot June 3, 2026 21:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

Comment thread protocol/ssh/connection_test.go Resolved
Comment thread protocol/ssh/connection_test.go Resolved
Comment thread protocol/ssh/connection.go Resolved
Comment thread protocol/ssh/connection.go Resolved
@kke
kke force-pushed the ssh-config-algorithm-fields branch from d3d1acc to b25317e Compare June 3, 2026 21:51
@kke
kke requested a review from Copilot June 3, 2026 21:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread protocol/ssh/connection_test.go Resolved
Comment thread protocol/ssh/connection.go Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread protocol/ssh/connection.go Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread protocol/ssh/connection.go Resolved
Comment thread protocol/ssh/connection_test.go Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread protocol/ssh/connection.go Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread protocol/ssh/connection.go Resolved
@kke
kke force-pushed the ssh-config-algorithm-fields branch from 741f386 to 1c4a925 Compare June 4, 2026 06:30
@kke
kke requested a review from Copilot June 4, 2026 06:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread protocol/ssh/connection.go Resolved
@kke
kke force-pushed the ssh-config-algorithm-fields branch from 1c4a925 to 56b9ce0 Compare June 4, 2026 07:41
@kke
kke requested a review from Copilot June 4, 2026 07:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread protocol/ssh/connection.go Resolved
Comment thread protocol/ssh/connection.go Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread protocol/ssh/connection.go Resolved
@kke
kke force-pushed the ssh-config-algorithm-fields branch from 85b272f to 7c1d272 Compare June 4, 2026 08:51
@kke
kke requested a review from Copilot June 4, 2026 08:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread protocol/ssh/connection.go Resolved
@kke
kke force-pushed the ssh-config-algorithm-fields branch from 7c1d272 to 94ecdeb Compare June 4, 2026 09:58
@kke
kke requested a review from Copilot June 4, 2026 09:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread protocol/ssh/connection_test.go Resolved
@kke
kke force-pushed the ssh-config-algorithm-fields branch from 94ecdeb to 534a1c8 Compare June 4, 2026 10:30
@kke
kke requested a review from Copilot June 4, 2026 10:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread protocol/ssh/connection.go Resolved
Signed-off-by: Kimmo Lehto <klehto@mirantis.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@kke
kke marked this pull request as ready for review June 4, 2026 10:52
@kke
kke merged commit f3cf1d2 into main Jun 4, 2026
13 checks passed
@kke
kke deleted the ssh-config-algorithm-fields branch June 4, 2026 10:52
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.

2 participants