Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

- - - - -

openSSH: Server Refused our Key

authentication

  • Please log in to reply
2 replies to this topic

#1 Guest_Jordan_*

Guest_Jordan_*
  • Guest

Posted 16 June 2009 - 05:16 AM

I learned how to fix this error the hard way, meaning I tried everything I knew when an easy search revealed the answer on the first hit. The error you get is "Server Refused our Key" in Putty when you've used PuttyGen to generate a public/private key pair for SSH authentication.

There can be many reasons that would cause this error but one in particular is the need to convert it to openSSH format. After you've uploaded your public key execute this command:

# ssh-keygen -if public_key > authorized_keys2

Next move authorized_keys into your ~/.ssh directory. Chmod the file to 600.

# chmod 600 ~/.ssh/authorized_keys2

Make sure your .ssh directory has the proper permissions:

# chmod 600 ~/.ssh

Try it now. If you have further problems, try the steps on this site: How to set up SSH keys: Frustration with "Server refused our key"

You can learn how to generate SSH keys from Linux to Linux here (by Tor).
  • 0

#2 TkTech

TkTech

    The Crazy One

  • Retired Mod
  • PipPipPipPipPipPipPip
  • 1144 posts
  • Location:Ottawa, Ontario

Posted 16 June 2009 - 06:22 AM

Heh, newer version of OpenSSH actively check permissions. If you check /var/logs/auth.log (or equiv for your distro) it should give you an error message about incorrect permissions.
  • 0
Helpful CODECALL Links: Join Us, Guidelines, FAQ, Post a Tutorial

#3 Guest_Jordan_*

Guest_Jordan_*
  • Guest

Posted 16 June 2009 - 06:27 AM

Permissions were fine on mine, it was the conversion to openSSH format that caused me grief. /var/logs/auth.log doesn't exist on several distrobutions. Instead try /var/log/secure which will show you permission errors but will not show any errors relating to an incorrectly formatted public key.
  • 0





Also tagged with one or more of these keywords: authentication

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download