The term 'ssh' is not recognized even though openSSH is installed #12546

Closed
opened 2026-01-31 03:18:27 +00:00 by claunia · 4 comments
Owner

Originally created by @zaidajani on GitHub (Feb 13, 2021).

Environment

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

Steps to reproduce

  1. Open windows terminal or PowerShell
  2. run ssh

Expected behavior

As I have OpenSSH installed, The behavior should happen to be like this.

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

Even though I have OpenSSH installed on my pc, It shows this error which is unexpected. In my windows terminal ( PowerShell ) This annoying error comes not allowing me to connect to my server on the cloud.

Originally created by @zaidajani on GitHub (Feb 13, 2021). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by the Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```powershell 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 ``` # Steps to reproduce 1. Open windows terminal or PowerShell 2. run `ssh` # Expected behavior As I have OpenSSH installed, The behavior should happen to be like this. ```powershell 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 Even though I have OpenSSH installed on my pc, It shows this error which is unexpected. In my windows terminal ( `PowerShell` ) This annoying error comes not allowing me to connect to my server on the cloud.
claunia added the Resolution-ExternalNeeds-Tag-Fix labels 2026-01-31 03:18:28 +00:00
Author
Owner

@DHowett commented on GitHub (Feb 13, 2021):

I suspect you're using 32-bit (x86) PowerShell. Can you run gci env:/PROCESSOR*?

@DHowett commented on GitHub (Feb 13, 2021): I suspect you're using 32-bit (x86) PowerShell. Can you run `gci env:/PROCESSOR*`?
Author
Owner

@zaidajani commented on GitHub (Feb 14, 2021):

It says I use x86 PROCESSOR_ARCHITECTURE

PS C:\Users\Admin> gci env:/PROCESSOR*

Name                           Value
----                           -----
PROCESSOR_ARCHITEW6432         AMD64
PROCESSOR_REVISION             1801
PROCESSOR_LEVEL                23
PROCESSOR_IDENTIFIER           AMD64 Family 23 Model 24 Stepping 1, AuthenticAMD
PROCESSOR_ARCHITECTURE         x86


PS C:\Users\Admin>
@zaidajani commented on GitHub (Feb 14, 2021): It says I use x86 `PROCESSOR_ARCHITECTURE` ```powershell PS C:\Users\Admin> gci env:/PROCESSOR* Name Value ---- ----- PROCESSOR_ARCHITEW6432 AMD64 PROCESSOR_REVISION 1801 PROCESSOR_LEVEL 23 PROCESSOR_IDENTIFIER AMD64 Family 23 Model 24 Stepping 1, AuthenticAMD PROCESSOR_ARCHITECTURE x86 PS C:\Users\Admin> ```
Author
Owner

@DHowett commented on GitHub (Feb 14, 2021):

This is a bug with how Windows automatically registers OpenSSH. Because it lives in “system32”, a folder which 32-bit processes redirect, it cannot be found by looking in the PATH. You should prefer to use a native/64-bit shell unless you have a specific reason not to, or use the full redirected path to OpenSSH, c:\windows\sysnative\openssh\ssh.exe.

@DHowett commented on GitHub (Feb 14, 2021): This is a bug with how Windows automatically registers OpenSSH. Because it lives in “system32”, a folder which 32-bit processes _redirect_, it cannot be found by looking in the PATH. You should prefer to use a native/64-bit shell unless you have a specific reason not to, or use the full _redirected_ path to OpenSSH, `c:\windows\sysnative\openssh\ssh.exe`.
Author
Owner

@mehmetakifaksoy commented on GitHub (Sep 9, 2023):

If you are using openssh for windows you can go to this path and after run on the cmd on administrator It works!

@mehmetakifaksoy commented on GitHub (Sep 9, 2023): If you are using openssh for windows you can go to this path and after run on the cmd on administrator It works!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#12546