Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
So what's the magic step to make shared key authentication work between Putty on a Windows box as the client, and Mandriva 2007.1 SSH server. I create my key pair in PuttyGen about every different way that's possible and I load the private key into Putty successfully and place my public key from Putty into user's authorized_keys with "cat key.pub >> authorized_keys" on SSH server, but I always get the message "server rejected our key". Anybody have any idea as to what I am missing? Any help is greatly appreciated. Thanks, Mike
Last edited by mpmackenna; 10-04-2007 at 12:00 PM.
Good tip, but I checked into it and my distro uses the authorized_keys file as opposed to the authorized_keys2 file. Appreciate it just the same though. Mike
does it work without any ~/.sshd/authorized_keys? also, check the formatting of the file; any leading characters, line breaks, etc. I believe that it should be one long line.
Apparently it is not just a putty issue. I tried using shared key authentication between two linux boxes, and had the same issue. Shared key authentication works just fine for my CentOS box, but when I try to use it on my Mandriva box it resorts back to password authentication. I looked at the sshd_config file and it looks correct, it is almost identical to the sshd_config on my CentOS box. It really has me scratching my head. Did you mean ~/.ssh/authorized_keys in the line above? I don't see how it could work without anything in that file, that is what it checks against. Perhaps I am misunderstanding your post. Thanks, Mike
Take a gander at your sshd_config file there should be an AuthorizedKeysFile directive that dictates where the file should be located.
Also check the StrictModes directive, if it is enabled and the key file is writeable to anyone besides the user it will not use public key authentication for that user as anyone could append their own key to the file and gain access as that user. A chmod 600 on the authorized_keys (or whatever it is called) should fix that.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.