Zabs
Zabs

Reputation: 14142

Generate SSH key on windows via command to specify email address

I have generated my keys using PuttyGen but need to be able to specify exactly the email address used with the following command but this doesn't work as I get an 'is not recognized as an internal or external command error'

ssh-keygen -t rsa -C "[email protected]"

Can anyone assist in running this command on Windows 10?

Upvotes: 4

Views: 13434

Answers (1)

user6134583
user6134583

Reputation: 98

You can use PuTTYgen to generate a key with those settings.

For the key type -t rsa you have to select SSH-2 RSA
and for the email / comment -C "[email protected]" you have to set the Key comment field to [email protected]

Example 1

After clicking Generate your can get your public key from the Public key for pasting into OpenSSH authorized_keys file field (this is the same as id_rsa.pub when generated with ssh-keygen)

If you also need the private key to be saved in OpenSSH format just go to Conversions > Export OpenSSH key (this is the same as id_rsa when generated with ssh-keygen)

Example 2

Upvotes: 8

Related Questions