A good friend of mine said I was not an advanced Linux user. (He is.) He was being kind to say the least as I consider myself somewhere between novice and intermediate if there is such a place. Compared to him I'm definitely novice. I was just struggling with a Linux server administration task today. I was trying to secure my new VPS following Linode documentation (BTW, Linode has been great so far) for "Basic" security and ran into a bit of a snag while trying to lock down my use of SSH. The trouble I ran into was with using RSA keys to authenticate my SSH connection with the server. I wanted to disable the password option and setup SSH to use a public / private key pair. The Linode documentation was helpful to a point but because I'm a Windows user it suggested that I use the PuTTY utilities to generate my keys and upload to the server. Unfortunately I kept getting the message:
"No supported authentication methods available"
The documentation on PuTTY wasn't helpful and after several searches turned up a lot of wrong answers I finally found a post that suggested that Ubuntu 9.10 uses OpenSSH which relies on OpenSSL and that something was wrong or incompatible with that OpenSSL and would cause PuTTY problems. (I can't find the post again to reference, sorry) I turned on logging in PuTTY to see what I could see and sure enough, OpenSSH is being used. I suppose there is a way to know that by looking on the server. Going with that assumption I decided to generate the keys on the server and then download the private key for use with PuTTY on my Windows box. Turns out that when I opened the id_rsa private key file with PuttyGen it was able to convert it to the "PuTTY" format for the file. Couple seconds later I loaded into PageAnt and viola I was connecting to my server via SSH without using a password.
Moral of this story. If you're using PuTTY to connect from Windows to an Ubuntu 9.10 server be sure to generate your keys on the server to save yourself some time and frustration.
References
Basic Security Settings (Linode Docs)
Linode VPS Hosting
Together: The Merb Story
4 years ago
No comments:
Post a Comment