Posh-SSH icon indicating copy to clipboard operation
Posh-SSH copied to clipboard

New-SshSession return $null

Open SmallShrimp opened this issue 4 years ago • 1 comments

New-SshSession return $null,

my code:

$Session = New-SshSession -ComputerName ip -Username administrator -Password pwd

i use Get-SshSession return connected true,but $Session is null.Why?

remark: My remote host is Windows Server 2019 and SSH has been enabled.

SmallShrimp avatar Sep 15 '21 05:09 SmallShrimp

The cmdlet does not have a username and a password parameter. It has a credential one where you pass a credential object

Sent from my iPhone

On Sep 15, 2021, at 1:12 AM, 晓旭 @.***> wrote:

 New-SshSession return $null,

my code:

$Session = New-SshSession -ComputerName ip -Username administrator -Password pwd i use Get-SshSession return connected true,but $Session is null.Why?

remark: My remote host is Windows Server 2019 and SSH has been enabled.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

darkoperator avatar Sep 15 '21 08:09 darkoperator