Super User is a question and answer site for computer enthusiasts and power users. 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

id_rsa is normally a default key.

I've created a new key named 'keyhello'

Update: I've also added this key by doing:

ssh-add /home/myuser/.ssh/keyhello

But I believe it still isn't my default key.

So, how can we put keyhello to be the default identity, instead of the id_rsa ?

I do see a -t but I've tried:

ssh-agent /home/mysuser/.ssh/keyhello -t 

No luck with this. I get a "Permission Denied" (if I put sudo ssh-agent ... I got the same "Permission Denied w/out even prompt me my sudo pass).

share|improve this question

migrated from Mar 28 '11 at 7:29

This question came from our site for professional and enthusiast programmers.

up vote 9 down vote accepted

In your ~/.ssh/config file put:

IdentityFile /home/myuser/.ssh/keyhello

which will tell the outgoing ssh connections to use that as the default identity

share|improve this answer
Go it. If the config file doesn't exist. I must create it. – MEM Mar 28 '11 at 10:18

You can specify an alternate keyfile on the command line with the -i option, or you can change it permanently with IdentityFile in the ssh client config file.

share|improve this answer

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.