Transferring Files - cat-box/aws-foundry-ssl GitHub Wiki

On This Page

If you would like to transfer files between the foundry server and your computer, you will want to set up WinSCP or CyberDuck. Ideally, you shouldn't be transferring anything to the ec2 instance, that is what the S3 bucket is for.

This provides an interface for file transfer without having to use command line. If you don't think you'll need this, skip on ahead to Accessing Foundry.

Opening Port 22

Before you connect to the server, you will need to open up port 22 in the EC2 Security Group. When opened, it allows for SFTP and SSH access. Aka, you will be able to use WinSCP or CyberDuck to access the files in your server.

You have two configuration options:

  1. Only allow access from your Public IP address. While this option is more secure, your public IP automatically changes every so often. This means that each time you would like to connect to the instance, you will have to change the IP address of the rule.
  2. Allow access from all Public IP addresses. While this option does open up a larger vulnerability in your system, it is unlikely to be exploited UNLESS you do not securely store your SSH key pair.

Instructions

  1. Login to AWS
  2. Navigate to the EC2 dashboard by searching EC2 in the Services dropdown.
  3. On the left-hand side click Instances.
  4. You should see a Running instance with the name FoundryServer. Select the instance.
  5. At the bottom of the screen, you will see instance details, click Security.
  6. Under Security groups, click the link. It should be labeled in the following format:
    sg-xxxxxxxxxxxxxxxxx (stackname-FoundryServerSG-xxxxxxxxxxxxx)
  7. Click Edit inbound rules.
  8. Click Add Rule.
  9. A new rule will appear at the bottom of the list. Configure the fields like so:
    Type: SSH
    Protocol: TCP
    Port Range: 22
    Source: If you would like option 1 (only your IP), select "My IP." 
            If you would like option 2 (all IP addresses), select "Anywhere"
    
  10. Click Save.

EC2 Instance IP

First, you will need to have your EC2 instance's IP handy. If you have a Dedicated IP, you will only have to do this once for the initial setup. If not, each time you reboot the instance, you will have to get this value again.

  1. Login to AWS.
  2. Navigate to the EC2 dashboard by searching EC2 in the Services dropdown.
  3. On the left-hand side click Instances.
  4. You should see a Running instance with the name FoundryServer. To the right of this name you will find a column titled Public IPv4 address. Copy this value.

SFTP Client Setup

I have provided instructions for WinSCP and CyberDuck. If you're on Windows, either one will work (my personal preference is WinSCP). For mac users, CyberDuck is available for you to use.

I emphatically suggest you do not use FileZilla

The FileZilla installer has been reported to contain malware (and as far as I know, still does). I will not be providing instructions on how to install and use this program for this reason.

WinSCP

Installation.

  1. Download the WinSCP Installer.
  2. Run the Installer and leave everything on default.
  3. Launch WinSCP when finished.

Setup

  1. Click Advanced...
    Advanced
  2. In the left menu, click Authentication
    If you saved your AWS Key Pair in .ppk format, you can skip to the next section

(.pem) Key Pair Only

  1. Click Tools
    Tools
  2. Click Generate New Key Pair with PuTTYgen...
    Generate New Key Pair with PuTTYgen...
  3. Click Load
    Load Keys
  4. In the bottom right corner, change to All Files (*.*)
    All Files (*.*)
  5. Open the SSH Key Pair you generated from AWS and used during setup
  6. If it successfully imported the key, click OK
    Success Message
  7. (Optional) Enter a passphrase for the key
  8. Click Save Private Key
    If you chose not to enter a passphrase, WinSCP will give a warning. Click Yes
  9. Choose a place to save the key. I recommend keeping it together with your .pem file from Amazon
  10. You now have a .ppk key pair! Close PuTTY Key Generator and return to WinSCP.

Setup (continued)

  1. If there isn't already a path set, click the ellipses (...) to open the SSH Key Pair you generated from AWS and used during setup You'll notice that there's a path to the newly generated key now. If at any point in the future you move the key, make sure you update its location in WinSCP as well.
    Key Path
  2. Click OK
  3. Enter the following in the fields
File Protocol: SFTP
Host name: Enter the EC2 Instance IP
Port number: 22
User name: ec2-user
Password: Optional password from the private key generated from PuTTY Key Generator
  1. Click Save
  2. Enter FoundryEC2 into the Site name. You can choose whether or not to save your password here. If you choose not to, you will have to enter the password each time you connect using WinSCP.
    Save Session
  3. Click OK.

Connecting

  1. On the left, you will see your saved FoundryEC2 session.
  2. Click on it, and click Login.
    Login
  3. Click Yes.
    Warning
  4. Enter your passphrase if you chose one.
  5. We're in! On the left, you will see your personal files from your computer. The right side will have the server's files.
    WinSCP

Transferring Files

WinSCP will automatically put you in the directory /home/ec2-user/ which is empty.

  1. In the right address bar where it says /home/ec2-user, double click to open a directory.
  2. Enter /foundrydata/Data/ to access the location where the data files are kept.
  3. Click and drag files you would like to transfer from the left pane, to the right pane.
  4. Click OK when prompted

CyberDuck

CyberDuck supports both Windows and Mac. It is free to use but may prompt you for donations. Purchasing from the Windows/Mac App store will disable the donation prompts. Help out the developers if you're so inclined!... or if you just can't stand popups

Windows

Download and Install

  1. Visit https://cyberduck.io/download/
  2. Download the Cyberduck for Windows Installer
  3. Run the installer and click install
  4. Launch CyberDuck when finished

Connecting

  1. Click Open Connection
    Open Connection
  2. Enter the following in the fields
    Dropdown: SFTP (SSH File Transfer Protocol)
    Server: Enter the EC2 Instance IP
    Port: 22
    Username: ec2-user
    Password: Leave this blank unless you have manually set a password for your key.
    
    For SSH Private Key, locate and open the SSH Key Pair you generated from AWS and used during setup
    Settings
  3. Click Allow
  4. You should be connected at this point!

Transferring Files

CyberDuck will automatically put you in the directory /home/ec2-user/ which is empty.

  1. In the address dropdown, click / to move to the root directory
    rootdir
  2. Foundry save files exist in the file path /foundrydata/Data, locate and navigate to the folder.
  3. Transfer away!

Mac

Unfortunately, I only have Windows and can't provide mac specific instructions you're on your own suckers ...ahem. Jokes aside, the setup process should be fairly similar to Windows. If you put in the same values when connecting, you should be golden.

Back to Top

⚠️ **GitHub.com Fallback** ⚠️