沙沙胡思乱想的地方
Posts tagged private key
How to setup SSH on Windows XP
Oct 7th
So easy so cool, that i can view mysql easily…
After reformatting my computer, I had to reinstall PuTTY, only to find that the page I needed was down. It’s still available via Google’s cache but since I’m doing it again, I thought I would write an easier guide on how to do it.
Please keep in mind that this the solution that worked for me using Dreamhost; I am not an expert on this so if you have trouble, please see the original tutorial (or Google’s Cache). Also, I couldn’t get this list to number properly while including headings but make sure you do this in the order I have. Now let’s go.
Getting Started
Download putty.zip (Or get the individual files from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)
Unzip the zip file and throw all of those files in C:\Windows\system32
Generating Keys
This is to ensure that only you can login
Open up the command promt by going to Start>Run, type: cmd and hit enter
Type: puttygen and hit enter to bring up the PuTTY Key Generator
Select SSH-2 DSA from the Parameters section
Now click Generate and randomly move your mouse around the blank Key area. You should see the progress bar increase as you move around
After the key is finished generating, you can and should enter a password in the Key passphrase field, just for added security; confirm the password in the next field. The Key comment field before that serves as a password hint so you can change it to something besides dsa-key-xxxxxxxx
After that, click the Save private key button and give it a cool name like 733tn355.ppk and save in a place where you wont forget about it.
Leave puttygen open for now.
Configuring PuTTY
Go back to the command prompt or open another one (Start>Run: cmd) and type putty
Make sure SSH is selected in the Protocols section
Click Default Settings from the Saved Sessions list and then hit Save. After that click cancel to close the dialog.
Putting a Public Key on your Server
You can do this part in the command prompt (Via the original guide) but I think it’s easier to do it via FTP.
Switch back to the PuTTY key generator and right-click on the box with the huge key you just generated. Click Select All, then right-click it again and select Copy.
Open up a new document in a plain-text editor like notepad, hit enter to go to the second line. Paste the key on that second line.
Save this file as authorized_keys (Notice that there’s no extension)
Login to your server via FTP and go to the highest directory you can go; you should end up there right when you login.
Make a folder called .ssh if it’s not there already
Go into that folder and drop the authorized_keys file in there
Change the Permissions/CHMOD of the authorized_keys file to 644. Go up a folder and change the Permissions of the .ssh directory to 755; this is important
You can close PuTTY Key Generator, your FTP Program and notepad if they’re open
Logging in
I was able to login at this point by going to the command prompt, typing plink mydomain.com and entering my username and password (Dreamhost people: it’s the FTP username/password). I don’t know why the original tutorial went further to do something else but if it doesn’t work for you, try doing the extra step
Go back to the command prompt and type pageant. Double-click on the computer wearing a hat when it pops up in your system tray
Click Add Key and go to where you stored that private key. Double-click it and enter your password for the key if you made one earlier
Now go to the command prompt and type plink mydomain.com
Enter your username and it should just login from there
That’s about it. Here are a few links with stuff you can do in the Shell
Bash Shell Programming in Linux
Linux & Shell commands
The complete command line list for Linux, Windows, Oracle, and MacOS
Recent Comments