Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In order to add a shell account to my authenticated github acc list, I need to retrieve it's public SSH key; how can I do that either in putty, or via bash directly?

share|improve this question
Have you created a public key in that shell account? Do you remember giving the file a particular name then, or did you simply use the default? – andol Dec 5 '09 at 9:38
This question may be better suited on (though I don't have the rep required to initiate a migration). – pkaeding Dec 5 '09 at 9:40
The server in question is in company's property; so at least I'm hitting the bottom-end of ServerFault's minimal requirements against questions :) – Silver Dragon Dec 5 '09 at 9:46
up vote 1 down vote accepted

You need to create a key. This key will be unique to your account. I'd suggest you take a look at:

Here is an excerpt from that site:

ssh-keygen -t dsa

This will prompt you for a secret passphrase. If this is your primary identity key, make sure to use a good passphrase. If this works right you will get two files called id_dsa and in your .ssh dir. Note: it is possible to just press the enter key when prompted for a passphrase, which will make a key with no passphrase. This is a Bad Idea ™ for an identity key, so don't do it! See below for uses of keys without passphrases.

The file is what you are after.

share|improve this answer
In my understanding, my SSH prompt already have a key -the one I'm using to access the bash prompt? And I figure, this is what GIT uses by default -so I don't have to configure a new one for it – Silver Dragon Dec 5 '09 at 9:42
Well, whatever it is a Bad Idea or not to create a ssh key without a passphrase large depends on what the key is meant to do. – andol Dec 5 '09 at 9:43
Yes, I think in this case, making a passphrase-less key may be permissible...but it is worth mentioning in any discussion about creating ssh keys. And, since it was in the paragraph explaining the command that actually creates the key in the page I quoted, I figured that warning should come along too. – pkaeding Dec 5 '09 at 9:55
So, what you are creating is a new key that will be used for authentication. It actually has nothing to do with your shell (bash in this case). The SSH client program will use this key when authenticating against a server. – pkaeding Dec 5 '09 at 9:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.