Git - How to find .ssh private and public keys

De openkb
Aller à : Navigation, rechercher

Sommaire

Questions

I have been trying to connect bitbucket to my local git repository but having hard time finding private and public keys.

I am generating .ssh keys from this command in bash

$ ssh keygen -t rsa

Generating public/private rsa key pairs
Enter file in which to save the key (/c/Users/TOSHIBA/.ssh/id_rsa):    password.txt (I don t have password.txt file on my system it was random file name I provided) 

Enter passphrase(empty for no passphrase): (I left empty)
Enter same passphrase again:
Your identification has been saved in password.txt.
You public key has been saved in password.txt.pub
The key fingerprint is:
9c:9e:07:63:45:ad:76:b3:d0:e1:e1:0f:6c:20:aa:c4 TOSHIBA@TOSHIBA-PC
The Key s random art image is

I am not able to find out keys generated. Please let me know if I am doing anything wrong.

Thanks

Answers

The private key is in your file password.txt and the public key is in password.txt.pub. The full path depends on your current working directory in the shell.

You could have just pressed enter instead of the file name. Then ssh-keygen would have saved it to the default file name /c/Users/TOSHIBA/.ssh/id_rsa. Using the default file name is a good idea because the ssh client will automatically find the key there.

Source

License : cc by-sa 3.0

http://stackoverflow.com/questions/32034597/how-to-find-ssh-private-and-public-keys

Related

Outils personnels
Espaces de noms

Variantes
Actions
Navigation
Outils