pal4life
pal4life

Reputation: 3388

ssh-keygen' is not recognized as an internal or external command

I am trying to add ssh keys for usage on github but on my xp on command prompt ssh-keygen does not work. It gives me the following error

ssh-keygen' is not recognized as an internal or external command.

Is there an alternative for generating keys on xp?

Upvotes: 62

Views: 188953

Answers (11)

Faker
Faker

Reputation: 1

cd C:\Program Files\Git\bin\ssh-keygen

it works fine on my laptop

Upvotes: -1

user22191016
user22191016

Reputation: 1

C:\Program Files\Git\usr\bin

Add this to the envvars and reopen cmd. Thats it.

Upvotes: 0

Kondal Kolipaka
Kondal Kolipaka

Reputation: 3559

  • Install msysgit
  • Right-click on any file
  • Select "Select Git Bash here" from menu
  • Run ssh-keygen command from a git bash terminal

Upvotes: 1

Mansi
Mansi

Reputation: 89

Running git bash as an admin worked for me!

Upvotes: 3

Daniel Sunaryo
Daniel Sunaryo

Reputation: 97

Search your git directory if you already install git

Use git bash should be on your C:\Program Files\Git\bin depend on your installation location

If you already add the path just run sh on your cmd or open sh.exe

type ssh-keygen

Then just insert name and passphrase (You can just type empty string).

Upvotes: 9

Arif Acar
Arif Acar

Reputation: 1571

for all windows os

cd C:\Program Files (x86)\Git\bin
ssh-keygen

Upvotes: 3

ScottLenart
ScottLenart

Reputation: 1210

If you previously installed Git, open a git-bash and try the command from there.

Upvotes: 24

ajknzhol
ajknzhol

Reputation: 6460

STEP 1 Install Git.

STEP 2 Add the path of your git to the environment variables like this C:\Program Files (x86)\Git\bin.

STEP 3 Open new terminal session and try ssh-keygen. It will work.

NOTE New Terminal Window is must!

Upvotes: 46

Sotos
Sotos

Reputation: 426

if you run from cmd on windows check the path System Variable value must have inside C:\Program Files\Git\bin or the path of you git installation on cmd type set to see the variables

Upvotes: 1

kini
kini

Reputation: 1803

Are you running msysgit, or some other form of Windows git installation? msysgit is only one possible way to run git on Windows but it's probably also the simplest one. It's also the way recommended by the git website at http://git-scm.org/ .

If you are using msysgit, then you need to run the command in Git Bash, not in a standard Windows command line prompt. Git Bash is a prompt that is installed for you by msysgit, and is basically the most common Linux command line shell (bash) packaged for Windows to facilitate command line usage of git. msysgit should also install the ssh-keygen program in a place where it is accessible from Git Bash, but not necessarily from your usual Windows command line prompt.

Upvotes: 54

thezboe
thezboe

Reputation: 552

ssh-keygen is a utility usually found on Linux distributions. You can use Cygwin on Windows to have most functionality of the Linux command line available to you.

http://www.cygwin.com/

Upvotes: -1

Related Questions