Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does 'the agent has no identities' mean?

Tags:

ssh

ssh-keys

I succesfully followed these instructions from GitHub on how to generate SSH keys and my connection with GitHub is succesfull.

But when I later want to check my SSH key following these instructions I don't get the SSH fingerprint I see in my GitHub SSH Keys setting page when I use ssh-add -l.

Instead of the SSH key fingerprint I get the message The agent has no identities. Why? And what does it mean?

like image 948
user2312234 Avatar asked Apr 13 '15 18:04

user2312234


People also ask

How do you enter a passphrase for a key?

$ ssh-keygen -p -f ~/. ssh/id_ed25519 > Enter old passphrase: [Type old passphrase] > Key has comment '[email protected]' > Enter new passphrase (empty for no passphrase): [Type new passphrase] > Enter same passphrase again: [Repeat the new passphrase] > Your identification has been saved with the new passphrase.

What does the SSH agent do?

The SSH agent ( ssh-agent ) is an SSH key manager that stores the SSH key in a process memory so that users can log into SSH servers without having to type the key's passphrase every time they authenticate with the server.

How do I generate an SSH key in GitHub?

Login to github.com and bring up your account settings by clicking the tools icon. Select SSH Keys from the side menu, then click the Add SSH key button. Name your key something whatever you like, and paste the contents of your clipboard into the Key text box. Finally, hit Add key to save.


1 Answers

This means you haven't successfully added your key to your agent. Use ssh-add to do so, as given in step 3, part 2 of your first link.

Note that this needs to be done for each ssh-agent instance; thus, if you log out and back in, you need to ssh-add your key again. Similarly, if you start ssh-agent twice, in two different terminal windows, they won't have shared private keys between them, so you would need to ssh-add once in each window (or, better, configure your system in such a way as to have an agent shared between all running applications in your desktop session).

Modern desktop environments generally will provide a SSH keyring for you, so you shouldn't need to start ssh-agent yourself if your agent is so configured, and the agent instance so provided should be shared across your entire session. gnome-keyring behaves this way, as does Apple's keychain and KDE's Wallet (with ksshaskpass enabled).

like image 197
Charles Duffy Avatar answered Oct 30 '22 19:10

Charles Duffy