-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Support OpenSSH options for PSRP over SSH commands #12802
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -179,6 +179,13 @@ Describe "SSHRemoting Basic Tests" -tags CI { | |
| Write-Verbose -Verbose "It Complete" | ||
| } | ||
|
|
||
| It "Verifies explicit Options parameter" { | ||
| $options = @{"Port"="22"} | ||
| $script:session = New-PSSession -HostName localhost -Options $options -ErrorVariable err | ||
| $err | Should -HaveCount 0 | ||
| VerifySession $script:session | ||
| } | ||
|
Comment on lines
+182
to
+187
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test checks that the parameter is only recognized, but does not verify that it is being applied.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can definitely add more integration tests, it will take me a few days to get those done though. |
||
|
|
||
| It "Verifies explicit Subsystem parameter" { | ||
| Write-Verbose -Verbose "It Starting: Verifies explicit Subsystem parameter" | ||
| $portNum = 22 | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we get this through public API should we make additional validations?
I mean that
KeyandValuecould contain composite values./cc @PaulHigin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see your point, right now the Format method will just try to convert whatever is passed in to a string, would we want to handle composite values any other way?
I also could try to add some validation to ensure that we're only passing options that OpenSSH would consider valid, but that would be a lot to maintain as well. Please let me know your thoughts.