• http://www.wordimpressed.com Devin Walker

    A few of these steps are hard to complete on a Windows system. Such as “Download the new key from your computer using your ubuntu account. On your computer, use Terminal:” that’s where I’m stuck…

    • jeffreifman

      the ubuntu account is the AWS server. read it as download the new key from AWS to your windows computer. Do a google search on putty SSH for windows – it’s the Windows SSH connection that I use Terminal for on OSX

      • Sarah Collins

        I got stuck at this step too. Can anyone provide a bit of info on how this would actually happen? I’m sorry, I’m a complete newb and not very comfortable in command line yet. :(

        • bm2wong

          If you connected to the AWS server using PuTTY in Windows, you will already have pscp installed.

          Change directory to where PuTTY is installed, then run pscp:

          C:Program FilesPuTTY>pscp -i .ppk ubuntu@ec2-xxx-xxx-xxx-xxx.compute-1.amazonaws.com:/tmp/*

          replace with the .ppk file you used to store your private key pair generated by EC2. Also change the ec2-xxx-xxx-xxx etc. to your public DNS for your EC2 instance.

  • Chad

    I’m also stuck at this step:
    scp -i ~/.ssh/wordpress.pem ubuntu@ec2-xx-xx-xx-xx.compute-1.amazonaws.com:/tmp/* ~/.ssh

    I get this warning:
    Warning: Identity file /home/wpadmin/.ssh/wordpress.pem not accessible: No such file or directory.

    which makes sense because I’m not sure this file was even created in previous steps.

    • jeffreifman

      Hi Chad… this scp command is from your desktop computer to your AWS instance. It’s purpose is to copy the newly created key for the new user e.g. hal (that you created on AWS) back to your desktop computer. So, in this example, the WordPress.pem file is the key file I use to access my AWS instance when I first created the instance. You should use whatever key file you are using to first access your instance. Once you get the new key down to your desktop, you can login with the new account and the new key.

  • Matt

    Don’t forget to change the port in ssh_config, and etc/services too.

  • dextersaintjocke

    This is an awesome tutorial, as a newbie I found it very helpful and what I was hoping to find.

    • http://jeffreifman.com/ Jeff Reifman

      Thanks DSJ! Please share it widely on Twitter et al.

  • Arturas

    I am also stuck on the step of copying they key to my Mac. I figured out the syntax, but what I get is “Permission denied (publickey)” error. Which is strange, because I can move between folders and connect to AWS no problem + I added AllowUsers to sshd_config

    • http://jeffreifman.com/ Jeff Reifman

      Did you figure this out? Please give specifics about the steps you took and what error message they are generating.

      • http://www.facebook.com/eduardo.d.falcao Eduardo De Lucena Falcão

        I had the same problem, but figured out that I just copied and pasted the “Allowusers” and didn’t change the “hal” to my user. After doing that, all went right. =)

  • Cristi Constantin

    Great tutorial, thanks!

  • Jeremy Lundy

    Awesome guide Jeff! I have a noob question. Why replace the ubuntu user with another user? It seems like either account is equally secure since they both require a private key for authentication.

    • Greg Tczap

      Two reasons I can think of are 1. hal is not a root user, and 2. ubuntu is known to hackers but hal is not

  • cscooper2000

    I’m fairly technical, but this seems like a lot of work (and typing) just to host a simple php script (WordPress). :) What benefit are you getting from this vs. hosting with a “regular” web host such as Small Orange (the host I’m currently looking into getting set up with; moving away from BlueHost). Is the cost of AWS going to allow for only ONE WordPress install under a single domain? I need about 10 – 20 domains pointing to the same number of WP installs (basically 10 – 20 different websites and mySql databases hosted under one account). Can I do that with AWS? At what cost?

  • Paul

    I followed the instructions to edit the etc/sudoers file by running these commands: sudo nano /etc/sudoers and then adding the ‘hal ALL=(ALL) NOPASSWD:ALL’ however doing this has messed up my ‘sudoers’ files.

    It turns out that you should only do this in the Visudo mode. Now my sudo command doesn’t work at all. How do I fix this on a remote server?

    I’ve only found how to do it locally: http://www.psychocats.net/ubuntu/fixsudo

    Should, I just delete the instance and start over?