Skip to content

Fix local remoting #801

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

Merged
merged 7 commits into from
Nov 30, 2018
Merged

Conversation

TylerLeonhardt
Copy link
Member

@TylerLeonhardt TylerLeonhardt commented Nov 29, 2018

Before, if you did:

Enter-PSSession .
Enter-PSSession -HostName tyler@localhost:4321

or any variation that uses localhost... this would get marked as a "Local" session and psedit would not get registered (other bad things could have been happening too...).

This fix makes all PSRP sessions "Remote" sessions so that psedit registers correctly.

This also allows a user to start ssh server in WSL or a container and use:

Enter-PSSession -Hostname tyler@localhost:4321

to get remote editing & debugging in PSES

Copy link
Contributor

@rjmholt rjmholt left a comment

Choose a reason for hiding this comment

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

LGTM!

@rjmholt rjmholt requested a review from PaulHigin November 29, 2018 18:12
Copy link
Collaborator

@SeeminglyScience SeeminglyScience left a comment

Choose a reason for hiding this comment

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

LGTM, just a couple nits

Copy link
Contributor

@rkeithhill rkeithhill left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

@PaulHigin PaulHigin left a comment

Choose a reason for hiding this comment

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

LGTM, except for what looks like unused code.


// hostname is 'ServerRemoteHost' when the user enters a session.
// ex. Enter-PSSession, Enter-PSHostProcess
if (hostname == "ServerRemoteHost")
{
runspaceId =

Choose a reason for hiding this comment

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

This runspaceId variable doesn't seem to be used anywhere, and perhaps it is not needed. Also the default value returned should not be runspace, but a default runspace id.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've deleted that line of code. Thanks @PaulHigin!

@rjmholt
Copy link
Contributor

rjmholt commented Nov 30, 2018

Thanks @PaulHigin!

@rjmholt rjmholt merged commit 9cce6ed into PowerShell:master Nov 30, 2018
@TylerLeonhardt TylerLeonhardt deleted the fix-local-remoting branch January 9, 2019 20:24
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.

5 participants