CMD.exe and Powershell.exe cannot generate ssh keys using ssh-keygen

  access-denied, cmd, powershell, ssh, windows

Hope you can help me out here. I’ve been playing around with some SSH authentication. I have no idea why this is happening, but now when I run a simple ssh-keygen command I get a response saying Access is denied. in addition to a pop-up that reads "This app can’t run on your PC. To find a version for your PC, check with the software publisher".

I then tried running the ssh-keygen command in Poweshell (as admin and as regular user) and got the following:

Program 'ssh-keygen.exe' failed to run: The specified executable is not a valid application for this OS platform.At
line:1 char:1
+ ssh-keygen
+ ~~~~~~~~~~.
At line:1 char:1
+ ssh-keygen
+ ~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (:) [], ApplicationFailedException
    + FullyQualifiedErrorId : NativeCommandFailed

However, using ssh -V shows that it is installed:

OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2

I can still SSH fine into other devices, if that’s of any relevant.

Any help would be very much appreciated here!

Source: Windows Questions