darkoperator / darkoperator/Posh-SSH
New-SSHRemotePortForward function not work
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 1.1k
- Forks
- 222
- PR merge metrics
- No merged PRs in 30d
Description
PS D:\Posh-SSH> Get-SSHSession
PS D:\Posh-SSH> New-SSHSession -ComputerName 192.168.3.42 -Credential root -Port 22
SessionId Host Connected
0 192.168.3.42 True
PS D:\Posh-SSH> New-SSHRemotePortForward -LocalAdress 192.168.4.8 -LocalPort 1337 -RemoteAddress 192.168.5.6 -RemotePort 3389 -Index 0
Write-Verbose : Cannot bind argument to parameter 'Message' because it is null.
At D:\Posh-SSH\PortForward.ps1:186 char:31
-
Write-Verbose $session.index -
~~~~~~~~~~~~~~ - CategoryInfo : InvalidData: (:) [Write-Verbose], ParameterBindingValidationException
- FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.WriteVerboseCommand
PS D:\Posh-SSH>
New-SSHLocalPortForward and New-SSHDynamicPortForward work is no problem, only New-SSHRemotePortForward does not work, I hope to help solve, thank you very much
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in PortForward.ps1 around line 186 and reproduce the issue with the New-SSHRemotePortForward command shown in the report. Trace why $session.index is null, then verify that remote port forwarding completes without the Write-Verbose binding error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- cli, networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100