1.11M Members

Fedora 16 not accepting SSH Keys

 
0
 

I'm trying to connect to my Fedora machine using my SSH PEM Key. I've added the key to .ssh/authorized_keys and am still getting promted for a password. The machine can connect to other machine's with the key, but not my Fedora one.

I've setup CentOS to accept SSH Keys but I believe this is my first time for Fedora, maybe there's an extra something I'm missing.

I uncommented these lines in /etc/ssh/sshd_config and still no luck :( :

RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile      .ssh/authorized_keys
AuthorizedKeysCommand none
AuthorizedKeysCommandRunAs nobody
 
0
 

You need to add the public key part to authorized_keys. The .pem file has the private key. When you ran the program ssh-keygen, it created the .pem file, but it also generated a .pub file. It is the .pub file that you need to append to .ssh/authorized_keys. The following is from the ssh-keygen man page:

 Normally this program generates the key and asks for a file in which to store the private key.  The public key is
 stored in a file with the same name but “.pub” appended.  The program also asks for a passphrase.  The passphrase
 may be empty to indicate no passphrase (host keys must have an empty passphrase), or it may be a string of arbi-
 trary length.  A passphrase is similar to a password, except it can be a phrase with a series of words, punctua-
 tion, numbers, whitespace, or any string of characters you want.  Good passphrases are 10-30 characters long, are
 not simple sentences or otherwise easily guessable (English prose has only 1-2 bits of entropy per character, and
 provides very bad passphrases), and contain a mix of upper and lowercase letters, numbers, and non-alphanumeric
 characters.  The passphrase can be changed later by using the -p option.
 
0
 

I added the public key part (Did my post lead you to believe that I added the PEM?). I did things the same way as I did on CentOS and it's working there, but not on Fedora for some reason.

 
0
 

Ok. Yes, I misunderstood that... :-) Unless the file was mangled for some reason (DOS CR/LF line terminators vs. Unix/Linux LF terminators, for example), then I don't know why Fedora won't work. Anyway, verify that the file is a Linux text file (LF line separators) and not in DOS/Windows format.

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: