darkoperator / darkoperator/Posh-SSH

InvalidOperation: (Renci.SshNet.SshClient:SshClient)

Open
#322 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PowerShell
Stars
1.1k
Forks
222
PR merge metrics
No merged PRs in 30d

Description

Hi,
I've installed (by downloading .zip) and imported the Posh-ssh 2.2 module on Windows 2012 R2 machine.

I'm unable to establish an ssh session. I tried with different devices and of them throws the same error. The following error appears. I'm able to establish telnet to 22 port. The same code works fine on my PC (Windows 10).

PS D:> New-SSHSession -ComputerName "192.37.127.128" -Credential $creds -ErrorAction Stop -AcceptKey -ConnectionTimeout 10000 -Verbose

VERBOSE: Using SSH Username and Password authentication for connection.
Exception has been thrown by the target of an invocation.
At line:1 char:1
+ New-SSHSession -ComputerName "192.37.127.128" -Credential $creds -Err ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (Renci.SshNet.SshClient:SshClient) [New-SSHSession], TargetInvocationException
    + FullyQualifiedErrorId : SSH.NewSshSession

Regards,
Jakub

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the New-SSHSession entry point and reproduce the failure on Windows Server 2012 R2 using the downloaded Posh-SSH 2.2 module, then compare it with the working Windows 10 case. Inspect the underlying exception rather than only the TargetInvocationException; done means the session connects or the issue reports a specific, actionable compatibility error.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.