darkoperator / darkoperator/Posh-SSH

Force parameter not working in 3.0 alpha

Open
#375 4 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

Running the 3.0 alpha on Powershell 7.1.1 on Ubuntu 20.
When using the -Force parameter as such:
New-SSHSession -ComputerName "10.1.2.28" -Credential $cred -Force
I get an error message:
New-SSHSession: Object reference not set to an instance of an object.

Removing the -Force parameter fixes the issue.

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

Reproduce the New-SSHSession command in PowerShell 7.1.1 on Ubuntu with and without -Force, confirming the null-reference error and the successful comparison case. Trace the Force parameter's handling in the module, then verify that a forced session succeeds without the exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.