LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-12-2019, 08:09 AM   #1
validator456
Member
 
Registered: Apr 2013
Location: Rotterdam, The Netherlands
Distribution: Crunchbang Linux
Posts: 234

Rep: Reputation: Disabled
Identification of Github ssh


I have setup a Github ssh key according to instructions. I did the same for Gitlab, also according to instructions. And it works.
But what I would like to know is what pubkey of Github is related to what files on my harddisk.
In other words, can I identify what private keys on my harddisk relates to the Github pub key on Github?
 
Old 02-12-2019, 08:14 AM   #2
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,345
Blog Entries: 3

Rep: Reputation: 3756Reputation: 3756Reputation: 3756Reputation: 3756Reputation: 3756Reputation: 3756Reputation: 3756Reputation: 3756Reputation: 3756Reputation: 3756Reputation: 3756
Yes, you can match a private key on your disk with the public key uploaded to GitLab or whatever.

Which instructions did you follow? What was the file name after the -f option when you used ssh-keygen to make the key pair in the first place?
 
Old 02-12-2019, 02:12 PM   #3
validator456
Member
 
Registered: Apr 2013
Location: Rotterdam, The Netherlands
Distribution: Crunchbang Linux
Posts: 234

Original Poster
Rep: Reputation: Disabled
Well, the name is the problem of course. My Github key gives a line like bc:27:ac:34: etc.

That doesn't offer much of identification. Isn't there a command line command that I can use so that I can identify which public key is used in Github? And not based on name?
 
Old 02-12-2019, 02:23 PM   #4
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,345
Blog Entries: 3

Rep: Reputation: 3756Reputation: 3756Reputation: 3756Reputation: 3756Reputation: 3756Reputation: 3756Reputation: 3756Reputation: 3756Reputation: 3756Reputation: 3756Reputation: 3756
Quote:
Originally Posted by validator456 View Post
Well, the name is the problem of course. My Github key gives a line like bc:27:ac:34: etc.
That would be the fingerprint in the form of an MD5 checksum, a outdated format. SHA256 is the current best practice. However, be that as it may, you can use ssh-keygen to check your existing keys and display their fingerprints. Then you can manually find a match and rename the key files to something more mnemonic.

Code:
for f in ~/.ssh/*.pub; 
do 
        echo
        echo $f
        ssh-keygen -E md5 -lf $f; 
done

Last edited by Turbocapitalist; 02-12-2019 at 02:29 PM.
 
Old 02-13-2019, 01:14 PM   #5
validator456
Member
 
Registered: Apr 2013
Location: Rotterdam, The Netherlands
Distribution: Crunchbang Linux
Posts: 234

Original Poster
Rep: Reputation: Disabled
Thank you, turbocapitalist. I am going to try it.
 
Old 03-12-2019, 04:31 AM   #6
validator456
Member
 
Registered: Apr 2013
Location: Rotterdam, The Netherlands
Distribution: Crunchbang Linux
Posts: 234

Original Poster
Rep: Reputation: Disabled
That worked splendidly. Thanks again, Turbocapitalist.
 
  


Reply

Tags
git, github, ssh keys



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Learn to use GitHub with GitHub Learning Lab LXer Syndicated Linux News 0 04-20-2018 01:12 AM
LXer: GitHub wants more new contributors, because that's what GitHub is for LXer Syndicated Linux News 0 07-27-2017 06:36 AM
Routing - cannot SSH to a server (Did not receive identification string) Jay2k1 Linux - Networking 0 07-21-2011 08:23 AM
ssh "remote host identification has changed" dave`2005 Slackware 3 06-23-2006 03:21 PM
ssh login problem RedHat AS3 ("Did not receive identification string from") spaniel Linux - Security 1 07-03-2005 06:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration