简体   繁体   中英

Why won't the command prompt identify ssh-keygen when I run it on my windows pc?

The following message appears" 'ssh-keygen is not recognized as an internal or external command, operable program, or batch file' from appearing?

What do I do about it?

Because it's not installed? Or not on the path?

If it isn't installed an easy way to install everything is to install Git for Windows, and when it gets to the section asking if you want to install the Linux tools it will give you 3 options. Choose the 3rd option, even though it displays the warning under it. It will install all the Linux tools nicely on Windows. Restart your terminal, type ssh-keygen, and you're good to go.

If it is installed:

Copy the path to the program

Right-click 'My Computer' and click Properties

Click 'Advanced System Settings'

Click Environment Variables

Add a semicolon to the end of the 'Path' variable and paste in the directory with the ssh-keygen program

If you have installed an msysgit distribution , then you need to launch:

  • git-cmd.bat , or
  • git-bash.bat (based on [ Git bash.vbs ][3] )

That will set the path correctly, and in that command line session, you will be able to call ssh-keygen .

Assuming you have already installed git in windows...

1) Control Panel > System > Edit the system variables

2) System Properties > Advanced (Tab) > Environment Variables (Bottom of tab)

3) System Variables > New

Variable Name: ssh-keygen

Variable Value C:\\Program Files\\Git\\git-cmd

Click ok

4) Close and restart you CMD/Shell Window

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM