Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to generate public key from windows command prompt

Tags:

ssh-keys

I need to generate public key to set up in ssh. How do I do it from windows command prompt? I tried using ssh-keygen -t rsa from c:\ but received a message ssh-keygen is not recognized as an internal or external command, operable program or batch file.

like image 986
Do Good Avatar asked Feb 05 '13 14:02

Do Good


People also ask

What is the command for generating the key in SSH?

Use the following procedure to generate an SSH key pair on UNIX and UNIX-like systems: Run the ssh-keygen command. You can use the -t option to specify the type of key to create. The command prompts you to enter the path to the file in which you want to save the key.


2 Answers

ssh-keygen isn't a windows executable.
You can use PuttyGen (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html) for example to create a key

like image 66
chill0r Avatar answered Sep 19 '22 19:09

chill0r


Just download and install openSSH for windows. It is open source, and it makes your cmd ssh ready. A quick google search will give you a tutorial on how to install it, should you need it.

After it is installed you can just go ahead and generate your public key if you want to put in on a server. You generate it by running:

ssh-keygen -t rsa 

After that you can just can just press enter, it will automatically assign a name for the key (example: id_rsa.pub)

like image 40
Eduardo La Hoz Miranda Avatar answered Sep 18 '22 19:09

Eduardo La Hoz Miranda