Centos 6.3. Brand new installation. Did ssh-keygen and files are in my ~/.ssh directory. when I ssh user@, 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?


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.

  • 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@ 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 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

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.