On a Windows machine:
- Download any jpg or gif image to your local machine and name the file background.jpg or background.gif depending on the file type.
- Download the Filezilla client.
- Select Edit -> Settings -> Connection -> SFTP.
- Press Add key file… button.
- Locate and select your .pem key file.
- Click OK in the bottom left pane.
- Select File->Site Manager
- Press New Site
- Add IP address to Host field.
- Set Port field to 22
- Set Protocol to SFTP: SSH File Transfer Protocol
- Set Logon Type to Normal
- Set User to ec2-user
- Clear Password field
- Select OK
- Below the File menu option select the arrow for Open Site Manager.
- Choose the Site you created in step 4.
- Once a connection is established you can drag and drop files from your local machine to the Linux instance and vice-versa.
On a Mac machine, don’t be a wimp and use Filezilla. Do the following:
- Download any jpg or gif image to your local machine and name the file background.jpg or background.gif depending on the file type.
- Open up the Terminal application.
- Identify the absolute path to your .pem key file.
- Change directory to the location of the image you downloaded.
- Type the following command:
sftp -i PATH_TO_KEY_FILE/XXX.pem ec2-user@YOUR_IP_ADDRESS
where PATH_TO_KEY_FILE is the absolute path to your key file, XXX.pem is the name of your keyfile and YOUR_IP_ADDRESS is (wait for it) your IP address.
- Once logged into the remote machine with sftp, use the cd and ls commands to change the current working directory to where you want the uploaded file to be copied.
- Copy the file from your local machine to the current working directory of the remote machine using the following command:
put background.jpg
- You can quit out of sftp by using the quit command.
© 2017, Eric. All rights reserved.