Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add [Port] parameter to New-PSSession #3475

Copy link
Copy link
@WojtekKozaczynski

Description

@WojtekKozaczynski
Issue body actions

This is a change request to add optional [-Port <int>] parameter to the following version of the New-PSSession commandlet

New-PSSession [-HostName] <string[]> [-Name <string[]>] [-UserName <string>] [-KeyFilePath <string>] [-SSHTransport] [-[Port <int>] [<CommonParameters>]

Use Case

The use case is opening a remote session over SSH into a Widows 10 machine. The default SSH port is 22, but if the Developer Mode is enabled on the target machine that port is already assigned to “SSH Server Broker” and “SSH Server Proxy” services installed with that mode. To make PowerShell work with OpenSSH one needs to stop those services manually, or turn the Developer Mode off, on the target machine. OpenSSH can be configured to use any open port, but the current implementation of the New-PSSession uses the default port 22.

We should have an option to instruct PowerShell to use a non-default port while creating a remote session to specific host.

Corollary

From what I see when trying to open a remote session from a Debian machine to a Windows 10 machine with “SSH Server Broker” and “SSH Server Proxy” services running, the PowerShell hangs the entire terminal session on the calling/Debian machine.

Wojtek

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugResolution-FixedThe issue is fixed.The issue is fixed.WG-RemotingPSRP issues with any transport layerPSRP issues with any transport layer

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.