Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Centos 6.3. Brand new installation. Did ssh-keygen and files are in my ~/.ssh directory. when I ssh user@1.2.3.4, it returns: Permission denied (publickey,gssapi-keyex,gssapi-with-mic). I can't find any tutorials laying out why this is. Can you shed some light on the subject?

share|improve this question

1 Answer 1

Where are you sshing from and where are you sshing to? ssh-keygen needs to be run from the client machine. The private key always stays on that machine, and the public key gets deployed to the system you're connecting to.

share|improve this answer
    
i guess I should rephrase a bit. I'm trying to ssh from my new installation of CentOS6.2 and it gives me this: [user1@server1 ~]$ ssh user2@1.2.3.4 Permission denied (publickey,gssapi-keyex,gssapi-with-mic). I can ssh from server2 to server1 with no problems. –  usafitz Feb 1 '13 at 6:52
    
Did you do what I posted? Is 1.2.3.4 server2? The public key from server1 needs to be put in place wherever you're trying to connect to. –  EEAA Feb 1 '13 at 6:55
    
sure did, it seems to be the client side. what's the best way to de-bug (logs) for looking at this? (BTW, thanks!) –  usafitz Feb 1 '13 at 7:03
    
Check permissions on the private key. Should've owned by the user, and mode 600. –  EEAA Feb 1 '13 at 7:04
    
yep, I just checked everything and did the process again. no joy. It must be an initial configuration or something. –  usafitz Feb 1 '13 at 7:35

Your Answer

 
discard

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.