4

I'm having some problems with another version of SSH that I have installed on a windows machine.. I don't know how it got installed... but it is there: C:\Windows\System32\OpenSSH

I have another version which is the one I want to use in: C:\cygwin64\bin

For some reason, I can't seem to be able to uninstall that OpenSSH from my machine but it messes up my rsync commands.

How can I either uninstall that OpenSSH on system32 or have my CLI use the one installed on cygwin64.

I'm on a Windows 10 Home OS.

3 Answers 3

6

I'm having some problems with another version of SSH that I have installed on a windows machine.. I don't know how it got installed... but it is there: C:\Windows\System32\OpenSSH

Windows 10 1803, has the Windows Feature, OpenSSH Client installed by default. You can remove this Windows Feature with the following command within an elevated PowerShell command prompt.

Remove-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0

Once you have performed a reboot you can verify it's been removed with the following command within an elevated PowerShell command prompt.

Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'

For some reason, I can't seem to be able to uninstall that OpenSSH from my machine but it messes up my rsync commands.

You can also remove this feature in the typical location Windows Features are listed within the Settings UWP application. I am guessing you are not aware of this fact, and have been looking in Control Panel\Programs\Programs and Features

How can I either uninstall that OpenSSH on system32 or have my CLI use the one installed on cygwin64.

You actually have a very recent build of OpenSSH already installed.

1

You should be able to set a PATH that contains the directory of your desired SSH program, C:\cygwin64\bin, first.

1
  • 1
    This is the better answer. Don't remove what is built into Windows; having a feature available just might be useful in some way. Instead, just use your preferred solution instead. Although, in my opinion, what would really make this answer better are details on how to accomplish this (in the short term, via SET, and also how to modify this in the long term so that the change is automatically applied to new command prompts).
    – TOOGAM
    Oct 2, 2018 at 11:28
-1

The unwanted ssh executable is before your wanted one in your PATH. So simply remove C:\Windows\System32\OpenSSH from the PATH environment variable. Here's a guide.

You can search for all available ssh.exe in you PATH with where ssh in a cmd.exe prompt.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .