1

Here is the screen capture for the problem:

error

In command-line(CMD):

> ssh-keygen -t rsa -C "..."
'ssh-keygen' is not recognized as an internal or external program.

How to generate ssh key? How can I use ssh-keygen?

  • Possible duplicate of [ssh-keygen' is not recognized as an internal or external command](https://stackoverflow.com/questions/10146398/ssh-keygen-is-not-recognized-as-an-internal-or-external-command) – Raghav Dinesh Mar 02 '19 at 06:42
  • Is there anything missing in my previously accepted answer? – VonC Aug 27 '23 at 11:35

1 Answers1

1

Consider using Git for Windows, with a simplified PATH and a portable Git (like PortableGit-2.21.0-64-bit.7z.exe), uncompressed anywhere you want.

set PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\
set GH=C:\path\to\git
set PATH=%GH%\bin;%GH%\usr\bin;%GH%\mingw64\bin;%PATH%

In that CMD (run as a regular user, not admin), you should have ssh-keygen available.

Example for me:

vonc@VONC D:\
> where ssh-keygen
D:\prgs\git\latest\usr\bin\ssh-keygen.exe

But, due to a recent openssh change, use:

ssh-keygen -m PEM -t rsa -P "" -f afile

You will have a key compatible with classic PEM listeners.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250