0

I ran Get-Help which asked whether I wanted to run Update-Help, which I did.

How do I get help on using Posh-SSH from within the powershell CLI?

PS C:\>
PS C:\> Get-Command -Name *ssh*

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Function        Get-PoshSSHModVersion                              2.2        Posh-SSH
Function        Get-SSHPortForward                                 2.2        Posh-SSH
Function        Get-SSHSession                                     2.2        Posh-SSH
Function        Get-SSHTrustedHost                                 2.2        Posh-SSH
Function        Get-TwitterDirectMessages_EventsShow               0.0.7      PSTwitterAPI
Function        Get-TwitterDirectMessages_WelcomeMessagesRulesShow 0.0.7      PSTwitterAPI
Function        Get-TwitterDirectMessages_WelcomeMessagesShow      0.0.7      PSTwitterAPI
Function        Get-TwitterLists_MembersShow                       0.0.7      PSTwitterAPI
Function        Get-TwitterLists_SubscribersShow                   0.0.7      PSTwitterAPI
Function        Invoke-SSHCommand                                  2.2        Posh-SSH
Function        Invoke-SSHCommandStream                            2.2        Posh-SSH
Function        Invoke-SSHStreamExpectAction                       2.2        Posh-SSH
Function        Invoke-SSHStreamExpectSecureAction                 2.2        Posh-SSH
Function        Invoke-SSHStreamShellCommand                       2.2        Posh-SSH
Function        New-SSHDynamicPortForward                          2.2        Posh-SSH
Function        New-SSHLocalPortForward                            2.2        Posh-SSH
Function        New-SSHRemotePortForward                           2.2        Posh-SSH
Function        New-SSHShellStream                                 2.2        Posh-SSH
Function        New-SSHTrustedHost                                 2.2        Posh-SSH
Function        Remove-SSHSession                                  2.2        Posh-SSH
Function        Remove-SSHTrustedHost                              2.2        Posh-SSH
Function        Start-SSHPortForward                               2.2        Posh-SSH
Function        Stop-SSHPortForward                                2.2        Posh-SSH
Cmdlet          New-SSHSession                                     2.2        Posh-SSH
Application     start-ssh-agent.cmd                                0.0.0.0    C:\Program Files\Git\cmd\start-ssh-agent.cmd
Application     start-ssh-pageant.cmd                              0.0.0.0    C:\Program Files\Git\cmd\start-ssh-pageant.cmd


PS C:\>
PS C:\> posh-ssh New-SSHSession -ComputerName bandit.labs.overthewire.org 2220
posh-ssh : The term 'posh-ssh' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify
that the path is correct and try again.
At line:1 char:1
+ posh-ssh New-SSHSession -ComputerName bandit.labs.overthewire.org 222 ...
+ ~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (posh-ssh:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\>
PS C:\>

Perhaps I just have the wrong syntax.

Or, perhaps, it's not installed properly. From a different console:

` PS C:\Users\thufir> PS C:\Users\thufir> help New-SSHSession

NAME New-SSHSession

SYNTAX

ALIASES None

REMARKS None

PS C:\Users\thufir>

`

updating help seems to hang in a new console with administrator priveleges:

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS C:\WINDOWS\system32> Update-Help -Force -Verbose -ErrorAction SilentlyContinue

see also:

https://stackoverflow.com/q/52749398/262852

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.