[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

generating 4096 rsa public and private key, generating the fingerprint for it and comparing it with the one at gitorious.org.



Hi all,
I previously had 2048-bit public and private key. Now sometime back
2096 is told to be insecure so everybody is moving to 4096-bit public
and private key. Below is the way I did :-


$ $ ssh-keygen -b 4096 -t rsa -C "shirish@debian"
Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in .ssh/id_rsa4096_2013.
Your public key has been saved in .ssh/id_rsa4096_2013.pub.
The key fingerprint is:
5d:ab:44:4a:8a:ac:5f:1c:81:c8:79:3a:9d:88:df:81 shirish@debian

:~/.ssh$ cat id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCqYlFzpIAzQOhtctRwyShkErfrAjF1UyMfCstOFtHTmK8ZrYSkQXyeVDKqRIfwNQtDx8oDQ/tGTWC683V2uJfOLpSN/7WDGPu471W0BgEXu0MznnnZ526+qFjSUcZx4Rpy7rYx7Hel2460yIOa/fk8hstNDoHrilM94mZ3K+/1tq8m0P2fgnpq2sP64hRldmqiIfAMLYFBZc41wre+XdtYdtrT/FY0ANI7e7U+oi/AwGfZ0A4VCNDvv1BMkJj7EBVfFWsq+kaPWo6gDtKd1/HxYzB3wuViOcUaYSP7B14pcSFnyoe5PTjZDbq2qQojsPN19PP6+PAKAaRDK3ehOgTKM3sdboo1lwwmfdSMp0OrFRrOxoA82Iby0HjGtXvpivFPUgqF4wjkJzGSioWunWvSAwWYq5tacaVuncCSINtsvbPAvspVXSXSIAxg64K1bWDPFSAYJdPPP7h2Cj1HAni2rZXkaKLh0cKqAgKUCihPVHvEk2No2Ymm0wSpFX+uSGHFURo4D7MwE6x33k+XlpjHMUna3p2MD8pM9eKNdmfhiVygEYTueO+fM12Hm8vWf8ZNR6Y2M/RynR75sO5CRSlFbHp1I99aixMw0zB51xOGjkFpUsiMglO844oD2IDzl82qQiA4/CIP8zBgG9R9Jxbs91OEU1GfkoxHOJZ6zV2HGQ==
shirish@debian

Then did :-

$  eval "$(ssh-agent -s)"
Agent pid 10775

I already have xclip so didn't have to install it otherwise install xclip.

$ xclip -sel clip < ~/.ssh/id_rsa.pub (you are inputting the contents
of id_rsa.pub - the public key in clipboard)


I uploaded the public key to gitorious via Settings >  SSH Keys or
https://gitorious.org/~shirishag75/ssh-keys

and checked the fingerprint against the one I have.

$ ssh-keygen -lf ~/.ssh/id_rsa.pub
4096 5d:ab:44:4a:8a:ac:5f:1c:81:c8:79:3a:9d:88:df:81  shirish@debian (RSA)

and they were identical to the ones at gitorious.org

And lastly authenticated to gitorious via git :-

~$ ssh -T git@gitorious.org
The authenticity of host 'gitorious.org (87.238.52.168)' can't be established.
RSA key fingerprint is 7e:af:8d:ec:f0:39:5e:ba:52:16:ce:19:fa:d4:b8:7d.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'gitorious.org,87.238.52.168' (RSA) to the
list of known hosts.
Enter passphrase for key '/home/shirish/.ssh/id_rsa':
Welcome, shirishag75. Use git to push/pull your repositories

Notes :-

a. Have strong passphrase, if needed use apg to generate good passphrases.
b. Known_hosts seems to have some content apart from your public key.
Probably some sort of keypair.

-- 
          Regards,
          Shirish Agarwal  शिरीष अग्रवाल
  My quotes in this email licensed under CC 3.0
http://creativecommons.org/licenses/by-nc/3.0/
http://flossexperiences.wordpress.com
EB80 462B 08E1 A0DE A73A  2C2F 9F3D C7A4 E1C4 D2D8


Reply to: