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.

First of all I would like to know in Ubuntu 12.04 how ssh authenticates key (like which files are referred for the public key).

Say for an example I have a user name gitolite I want to provide SSH access without password authentication while doing a push or pull or any remote action. I have generated keys id_rsa.pub from Windows 7 machine and I have Ubuntu 12.04 LTS as Git server. I tried to copy contents of id_rsa.pub into authorized_keys file (location /etc/home/gitolite/.ssh as well as /home/gitolite/.ssh/). But still when I am trying to pull the file from the server it asks me to enter password for gitolite.

share|improve this question
Please don't generate keypairs on another machine as which you are using it on. One should never copy private keys over, ever. Generating a keypair on Windows will result in a different format, not compatible with OpenSSH anyway. Just generate a keypair on Ubuntu and add that to Gitolite. –  gertvdijk May 12 '13 at 9:03
If I create key pair on server (ubuntu) then I will need private key in my client machine(Windows 7). Isn't it? I have seen at my office these keys were generated at client machine and it worked but I don't know how they have copied this public key to server. –  RahulKumar May 12 '13 at 9:19
No need to share private keys. Just add multiple public keys on your server for authorization. Try to find documentation on how to add this to Gitolite. I've done this in the past a long time ago, and this site isn't the best place to ask I guess. –  gertvdijk May 12 '13 at 10:20
Any suggestion where to find the documentation for this as I have tried but didn't work in any case. –  RahulKumar May 12 '13 at 13:06
Finally I did it. Actually in sshd_config file there is a parameter UsePAM and ChallengeResponseAuthentication which must be set to no in order to work ssh key authentication. –  RahulKumar May 19 '13 at 19:38
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.