Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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

I'm using kubuntu and I generated a key using this command:

mkdir ~/.ssh
chmod 700 ~/.ssh
ssh-keygen -t rsa

and I prompted the passphrase and the location here:

Generating public/private rsa key pair.
Enter file in which to save the key (/home/b/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/b/.ssh/id_rsa.
Your public key has been saved in /home/b/.ssh/

I send to the host the public key file and when I try to clone the git repository it ask me a password (of himself, that I don't have). From the other side they say that everything is ok.

I have three files in the /.ssh: known_hosts, mykey.txt (private key) and (public key).

What do I have to do for cloning the repository without that it ask me the password?


I don't know about the server side. I guess they have ssh and they used that command because they did it before.

share|improve this question
up vote 1 down vote accepted

According to your ssh-keygen output there, the key was saved to id_rsa and, which is where they normally go. If you renamed them to mykey.txt and then you need to rename them back.

share|improve this answer
Yes, I've solved right now regenerating the keys with that name. Thank you. – DarkCoffee Jan 11 '13 at 21:44

You did not say where you put the public key file on the remote host. Ssh comes with convenience script ssh-copy-id (although this sends all your public keys, which may not be what you want).

What is the actual file name of your private key ? id_rsa ? Else ssh-add ~/.ssh/mykey.txt might be useful at each login.

You did not say if git was indeed using ssh at all.

All these can be clarified with actual logs of your attempts.

share|improve this answer
Thank you for the answer, I edit the question. – DarkCoffee Jan 11 '13 at 18:10

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.