Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8278721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T09:06:27+00:00 2026-06-08T09:06:27+00:00

I am new in Github. I have generated SSH key and now can see

  • 0

I am new in Github. I have generated SSH key and now can see it in the SSH Keys. Is it the public or private key?

I have sent the SSH Key (which I saw under SSH Keys) to my client. He asked whether it is public or not? He wants my private key.

Is there any need of Private SSH key? If so, how do I retrieve it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T09:06:29+00:00Added an answer on June 8, 2026 at 9:06 am

    TL;DR

    You can’t retrieve a private key from a GitHub account, but you can if you explicitly add the key file to a published repository. GitHub also limits you to seeing the fingerprint of public keys attached to an account; to my knowledge, you can’t view an account’s public keys on GitHub, either.

    Private vs. Public Keys

    An SSH public key is stored on a single line, and starts with a key-type field such as ssh-rsa or ecdsa-sha2-nistp256. A private key has multiple lines, and a header that identifies the key block. For example:

    —–BEGIN RSA PRIVATE KEY—–

    GitHub Only Accepts Public Keys

    You can’t actually add a valid private key to a GitHub account anyway. Currently, GitHub only accepts RSA and DSA public keys for this purpose. If you try to add a different key-type, or an invalid public key of any sort, you receive an error like the following:

    Key is invalid. It must begin with ‘ssh-rsa’ or ‘ssh-dss’. Check that you’re copying the public half of the key

    Private Keys Are Not Stored Server-Side in GitHub Accounts

    The upshot of all this is that–quite aside from the fact that you should never store your private keys server-side anyway–it isn’t possible to attach a private key to a GitHub account. Therefore, there’s no way to retrieve the private half of a key-pair from a GitHub account.

    Of course, while you can’t add SSH private keys to a GitHub account, you can add them to a published repository. As an example of this, the Vagrant project publishes a full key-pair, but it’s a special case.

    Publishing your secret key is inherently insecure. Don’t do it unless you understand the implications.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have generated SSH keys for a new server installation according to the procedure
I have a problem in running a new project which I downloaded from github.
My GitHub app seems to be adding new SSH keys to github every time
I am completely new to GitHub, and I have added two private repositories. One
I'm pretty new to Rails and have an issue which I can't quite get
I am new to git and github. Suppose I have a public github repository,
I am new to Git. I have a public repo on GitHub and me
I am new to github. I have been working on a code that I
I have a GitHub project which does the same thing (a simple RogueLike game
A project on GitHub that I have a fork of has a new pull

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.