Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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/id_rsa.pub.

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 mykey.txt.pub (public key).

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

Edit

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
add comment

2 Answers

up vote 1 down vote accepted

According to your ssh-keygen output there, the key was saved to id_rsa and id_rsa.pub, which is where they normally go. If you renamed them to mykey.txt and mykey.txt.pub 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
add comment

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
add comment

Your Answer

 
discard

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.