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?
1 Answer
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
-
I know it asks for a paraphrase, I entered nothing. Just enter. What should I do? Aug 30, 2012 at 13:31
-
ssh -v
.