This is an old revision of the document!
Visit Amazon Web Services and create an account
https://aws.amazon.com/
You will have to put credit card details in, but you won't be charged for your first year if you select a product in the free tier (the free tier has an adequate server for what we'll need).
Get logged in to the AWS site to you see your username beside the bell icon. When logged out, hit the orange button “Sign in to console”
It may take a few minutes for Amazon to approve your launch request
You'll be asked to set up a key pair and save it to your machine. Select “Create a new pair” and hit Continue. It's important you don't lose this file or you'll lose whatever is in your EC2 instance and will have to launch a new one
I have a video here that takes you through it. Only the first 3 minutes or so are relevant. Remember to change your server location to Europe/London.
https://peertube.armchairscientist.co.uk/videos/watch/e5ff67cd-2b73-4a60-9fdd-abc0c474211b
Once that is done, you should be able to connect to your instance from any Linux/MacOS computer by opening Terminal and entering this command:
ssh -i <youridentifyfile>.pem ubuntu@<your_server_ip>
Where <youridentifyfile>.pem is the public key and <your_server_ip> is your server’s IP, find it in the details (you may need to scroll sideways)
If the command returns an error saying the permissions are too weak then try altering the file permissions with this:
chmod 400 <key>.pem
You can also add the key to your known keys with this
ssh-add <key>.pem
then you only need to enter this next time you want to log in
ssh <server>
There are some extra steps needed to convert your PEM file to something compatible with PuTTY if you are using Windows. There are some instructions for that here:
https://aws.amazon.com/premiumsupport/knowledge-center/convert-pem-file-into-ppk/
Download putty here:
https://www.chiark.greenend.org.uk/~sgtatham/putty/
For simplicity, download the executables under “Alternative binary files”
The main program “putty.exe” 32-bit
And the key converter utility “puttygen.exe”
The MSI installer is more customisable but fiddly.
Another video guide to both converting and connecting
https://youtu.be/bi7ow5NGC-U
Now move on to the next set of instructions to set up a web and database server.
To find out more about a command you can read its manual pages with
man ssh
Or Google the command.
New to the Ubuntu command line? Try this
http://linuxcommand.org/
The following terms may interchangeably refer to the Ubuntu command line: Terminal, bash, shell, Linux, Mac, server
Check a file’s permissions with
ls -l
The permissions modifier command has its own syntax. Normally you can just remember a few common combos but type “man chmod” if you’re really interested.
Now move on to the next set of instructions to set up a web and database server.