0

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.

1

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.

  • Yes, I've solved right now regenerating the keys with that name. Thank you. – DarkCoffee Jan 11 '13 at 21:44
0

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.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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