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

I recently generated a key value pair on my university remote server to create .ssh directory and then I copy pasted contents of my .pub file in .ssh directory on my laptop into the authorized_keys files on the university remote server. I still have to enter my password now, why is it so?

share|improve this question
Does it ask for the password of your ssh user login or does it ask for the password of the private key file? Perhaps you just don't provide your private key correctly - are you using ssh-agent? – speakr Aug 30 '12 at 13:38
It asks for my password of ssh user login. It's a university server. I don't know if I am using ssh agent. – snihalani Aug 30 '12 at 13:39
Follow this answer and check if public key auth is working correctly with ssh -v. – speakr Aug 30 '12 at 14:04
up vote 2 down vote accepted

Usually the private key is protected by a pass-phrase. This isn't the same as your normal login password but you might have chosen the same value for both.

If you don't want to type in a pass-phrase for each connection, you have two choices

  • secure: use the SSH authentication agent on the laptop.
  • insecure: remove the pass-phrase from the private key.

If you have an empty pass-phrase, but are still prompted for your login password, it is probably because public-key authentication failed. Turn up logging in your ssh client (ssh -v) and check the server's sshd logs.

If you generated the key pair on the server, you wouldn't copy the public key from laptop to server as the file would be generated on the server not laptop.

Wherever you generate the keys, you need the private key on your laptop in the location and format expected by your SSH client software (e.g. PuTTY ssh client uses a different format than OpenSSH ssh client). You need to put the public key on the server in the OpenSSH format and in the appropriate ~/.ssh/authorized_keys file with owner-only permissions

share|improve this answer
I know it asks for a paraphrase, I entered nothing. Just enter. What should I do? – snihalani Aug 30 '12 at 13:31
@snihalani: see updated answer – RedGrittyBrick Aug 30 '12 at 13:39

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.