- ARTS
- COMPUTERS
- INTERNET
- HOME
- RECREATION
- SOCIETY
- PRIVATE
- PROJECTS
I had to do this again since I reinstalled a couple of things, so I thought I’d make some screenshots along with the story. The complete instructions can be found here Submit in the dreamhost knowledgebase but the general story is the same for all other webhosts who support SSH. I just made some screenshots along with it and some more descriptions. It works at most webhosts like Dreamhost or MediaTemple.
What are we going to do? Well, as you know, connecting to your webhost via Telnet (for fiddling around there) and FTP (to copy files over) is very very insecure: you send over all your private stuff, including passwords pretty plain over the Internet so anyone can listen in.
To be more secure we should use a secure connection. Nowadays, we should setup a SSH-2 connection to your webhost to have a secure line. To open up a SSH-2 connection you can use (for instance) a little freeware tool called "Putty 108K" (download it here 108K). (Putty 108K was made by Simon Tatham Submit). Just fill in your username, password and hostname in Putty and you will be able to make a connection, you will be able to manage this copy and paste action. However…
We don’t want to fill in our username and password each time we connect! Because we are extremely lazy and furthermore don’t want to fill in our username and password each time we set up a connection we want to automate this, so that we simply click the connection and we are in! And since it is then simpler than setting up a non-secure connection you will have a. a secure line and b. it costs less effort, so you will go secure!
What do we need?:
Software! Download the three following (yeah, free) packages here 108K (very very small).
1. Putty 108K
2. PuttyGen 108K
3. PageAnt 108K
Furthermore:
1. You need to have a webhost who supports SSH (most good webhosts do, if they do not, find another one 1/1), I’m hosting at Dreamhost and MediaTemple 1,514 (among others).
2. You need to know you hostname, username and password (normally you get this information when you sign up with your webhosting company, sometimes the information is the same as the telnet/ftp account information)
3. About 15 minutes
Here we go:
| Download something that can generate your SSH-2 RSA keys e.g. PuttyGen 108K here.
1. startup PuttyGen |
|
| Now you have a generated key which you can see in the box above.
1. type in a key passphrase like "helloworld" note: ofcourse the screenshot to the left is a demo so it’s no use typing over the 1024 characters to see if they are any use… |
|
| Now we need a tool to make the actual auto-connection, so download e.g. Pageant.exe 108K
1. Start up Pageant, it will sit in your system tray (next to your clock on the bottom right-hand side of your screen…) If all went well you should see your key under the "view Keys" option in PageAnt. |
|
| No we are going to actually connect…cool!
1. Rightclick the Pageant icon your system tray and press "New Session" You can now fill in the data from your session in Putty: main screen: connection > SSH > Auth: connection > Data: Now you can go back to the main screen (Session), fill in a name of your session and hit "save" to save it for later. E.g. name it "My Webhost" (not a real handy name if you have multiple webhosts…) |
|
| We are now ready to connect and save your key on the other end, at the webhosting company itself.
1. press "Open" in the screen you are sitting now you should now have a command prompt blinking at you. 5. type "cd ~", this should bring you to your home directory, type "pwd" to check if you are in your home dir. You are now in a fresh new .ssh directory on your server |
|
| Let’s now put our key in there!
11. open up your Putty keygenerator again and load your private key, then select all text at the top, rightclick it and click "copy" echo " do not forget the " " around the key! 13. now protect the file by typing "chmod 600 authorized_keys" We should be done now, let’s test it, type "exit" |
|
| right-click the Pageant icon in your system tray, choose "Saved Sessions" > "your saved session" and click it.
You should instantly be in a session with your webhosting company without having to type anything! wow…cool! |
If you are going to put pageant on your U3 or USB disk to carry it along, then make sure that you put your keys in a secure place on your stick. One good option is to create a TrueCrypt archive on your U3/USB disk and then hide your secret stuff in there. I made a U3 TrueCrypt 5.1a installer, which you can download here Submit. (it has the dutch language pack installed by default but you can add any other language packs in the zip file).
I hope this saves you some time!
