How to connect Amimoto instance to (S)FTP client software?

You may connect your Amimoto instance by SFTP client software. In order to do this you will need the private key (.pem) with string to an instance. 

The directory /var/www/vhosts which WordPress is installed is owned by the user of nginx who runs the web server, so you can’t upload files there with sftp client and so on.
So as Nginx and PHP-FPM (or HHVM) is operating in the ec2-user, it will change the Web server user.

Execution of Run HTTPD as ec2-user

  • On Windows:

    1. Download PuTTY
    2. Start PuTTY (from the Start menu, click All Programs > PuTTY > PuTTY).
    3. In the Category pane, select Session and complete the following fields:

    a) in the Host Name box, enter ec2-user@public_dns_name
    b) under Connection type, select SSH
    c) ensure that Port is 22

    4. In the Category pane, expand Connection, expand SSH, and then select Auth. Complete the following:

    a) click Browse
    b) select the .ppk file that you generated for your key pair, and then click Open
    c) click Open to start the PuTTY session

    5. If this is the first time you have connected to this instance, a security alert dialog box will be displayed. Click Yes. A window opens and you are connected to your instance.

  • On Mac:

    First of all you should login to the server (instance) in SSH.

    $ ssh -i {path_to_key}xxxx.pem ec2-user@{your_instance_ip_address}

After logging in to the instance using Windows or Mac method, run the following command.

$ curl -L https://raw.githubusercontent.com/amimoto-ami/run-httpd-as-ec2-user/master/run-httpd-as-ec2-user.sh | sudo bash

Run this command only once after you create the instance.

See: Operate the Nginx and PHP-FPM (or HHVM) in the ec2-user

Connect with SFTP client software

Connection Server Settings:

  • Server: IP address instance
  • User Name: ec2-user
  • Private key
  • Path: /var/www/vhosts/{instance name (optional)}
  • Connection method (Port): SFTP (22)

Examples of SFTP clients:

In the case of Cyberduck, you can select the private key (.pem). When prompted, enter the server information and put a checkmark in “use the public key authentication”.

Screen Shot 2015-01-20 at 15.51.03

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk