0

Have setup 2 Centos instance, created the public and private keys, but when trying to ssh from one machine to another getting following error message "Permission denied (publickey,gssapi-keyex,gssapi-with-mic)". Following are steps i followed :-

  1. ssh-keygen -t rsa
  2. cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
  3. chmod 755 ~/.ssh/authorized_keys
  4. Shut down the firewall, and checked sshd service status it is running.
  5. Copied the public key one machine to authorized keys file of another and vice versa.
  6. When trying to ssh from one machine to another getting the above said error.

Please help resolve the issue, is process different for google cloud?

2
  • 1
    What does the sshd log say about the attempts? Jul 13, 2017 at 7:29
  • I have tried to follow your steps, and I do not get any error. There is something wrong with your steps, 755 is wrong and should have been 600 or 644. But that doesn't explain the error message you are getting. There is likely useful information in /var/log/auth.log.
    – kasperd
    Jul 23, 2017 at 14:58

1 Answer 1

0

Troubleshooting SSH auth

  1. Show us your config file if you use one or show us your ssh command
  2. Use -vvv option and look where it went wrong
  3. Monitor your target machine's secure log - tail -f /var/log/secure

It could be as simple as permission issue but it should show on the logs.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .