X Tutup
The Wayback Machine - https://web.archive.org/web/20201219115730/https://github.com/PowerShell/PowerShell/pull/14462
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

WIP: Add -SSHTransportPath Parameter #14462

Draft
wants to merge 5 commits into
base: master
from

Conversation

@JustinGrote
Copy link

@JustinGrote JustinGrote commented Dec 18, 2020

PR Summary

Implementation of #13282

PR Context

This PR adds the -SSHTransportPath parameter to allow specification of a custom ssh executable. While it can be used to use a custom version of OpenSSH for compatibility or troubleshooting reasons, the primary impetus is to enable transport authors to substitute their own executables in order to provide alternative transports (such as websockets, rendevous, Azure Bastion-like services, phone-home debug sessions, etc.), since all Powershell does is spawn ssh and then pass stdin/stdout PSRemoting XML to/from the program.

This PR is intended to be as low impact and non-breaking as possible, and as such the Arguments passed to the command do not change and are not customizable, however they do provide all the information required to establish a session so a custom wrapper can translate the SSH arguments into whatever working options it requires.

This is intended as a low-impact stop gap until the PSRemoting engine is decoupled into a subsystem and a proper CustomTransportHandler interface is provided.

WIP to complete

  • @PaulHigin in the case the executable is not found, it currently gets wrapped and throws a generic eventing error, is it OK to adjust the eventing error with the file not found exception?
  • Tests

PR Checklist

Justin Grote added 2 commits Dec 18, 2020
Justin Grote
Justin Grote
@awakecoding
Copy link

@awakecoding awakecoding commented Dec 19, 2020

It was indeed a very minor change, now if all we could do was to add command-line parameters to be passed to the executable instead of the OpenSSH command-line, it would be fully usable! Great work. Again, I am surprised how little changes were required in the end, great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.
X Tutup