terminal: Can't use SSH with Powershell

Environment

Platform ServicePack Version      VersionString
-------- ----------- -------      -------------
 Win32NT             10.0.18363.0 Microsoft Windows NT 10.0.18363.0

Windows Terminal version (if applicable): 0.9.433.0

Steps to reproduce

  1. Open Windows Terminal Preview
  2. Run ssh

Expected behavior

usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-B bind_interface]
           [-b bind_address] [-c cipher_spec] [-D [bind_address:]port]
           [-E log_file] [-e escape_char] [-F configfile] [-I pkcs11]
           [-i identity_file] [-J [user@]host[:port]] [-L address]
           [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
           [-Q query_option] [-R address] [-S ctl_path] [-W host:port]
           [-w local_tun[:remote_tun]] destination [command]

Actual behavior

ssh : The term '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
+ ssh
+ ~~~
    + CategoryInfo          : ObjectNotFound: (ssh:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Additional Information

Something that’s interesting, is that I can’t even view the OpenSSH directory…

PS C:\Users\kuzi-moto> Get-Item "C:\Windows\System32\OpenSSH"
Get-Item : Cannot find path 'C:\Windows\System32\OpenSSH' because it does not exist.
At line:1 char:1
+ Get-Item "C:\Windows\System32\OpenSSH"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Windows\System32\OpenSSH:String) [Get-Item], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetItemCommand

But when using a normal PowerShell prompt, works just fine:

PS C:\Users\kuzi-moto> Get-Item "C:\Windows\System32\OpenSSH"


    Directory: C:\Windows\System32


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----        3/19/2019   1:21 AM                OpenSSH

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 27 (14 by maintainers)

Commits related to this issue

Most upvoted comments

windows settings > apps > apps & features > optional features > add a feature > openssh client

Already installed!

image