feat(ssh): Add SSH agent auth and configurable sudo#5
Open
f33rx wants to merge 1 commit intodeevus:mainfrom
Open
feat(ssh): Add SSH agent auth and configurable sudo#5f33rx wants to merge 1 commit intodeevus:mainfrom
f33rx wants to merge 1 commit intodeevus:mainfrom
Conversation
Add use_agent, agent_socket, and use_sudo options to the SSH provider block. When use_agent is true, authentication uses the SSH agent (SSH_AUTH_SOCK) instead of a private key. use_sudo defaults to true but can be disabled when the SSH user can run midclt directly. Refactors duplicated SSH config construction into buildSSHConfig().
Owner
|
Same as #3. This will need to be moved to https://github.com/deevus/truenas-go Again, my apologies. |
deevus
added a commit
to deevus/truenas-go
that referenced
this pull request
Feb 27, 2026
Add UseAgent, AgentSocket, and NoSudo options to SSHConfig. When UseAgent is true, authentication uses the SSH agent (SSH_AUTH_SOCK) instead of a private key. NoSudo skips the sudo prefix when the SSH user can run midclt directly. Closes #5 Based on work by Dalton Perdue in deevus/terraform-provider-truenas#5. Co-Authored-By: Dalton Perdue <dalton@perdue.io> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
9 tasks
Owner
|
Please rebase and test against deevus/truenas-go#13 and once confirmed working I will merge upstream. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds three new options to the SSH provider block:
SSH_AUTH_SOCKif no socket is specified.true. Set tofalsewhen the SSH user can runmidcltdirectly (e.g. a TrueNAS admin account).private_keybecomes optional (still required whenuse_agentis false). The two are mutually exclusive.Also refactors the duplicated SSH config construction into a shared
buildSSHConfig()helper.Tests included for all validation paths.