Transferring Files with AWS Transfer

AWS Transfer enables you to easily manage and securely share important files with PayNearMe using SFTP protocols. This document provides guidance on setting up a public/private key pair, accessing PayNearMe’s SFTP server, and transferring documents to and from PayNearMe.

Creating Key Pairs

To access the SFTP service, you need to generate a public/private key pair. The public key will be uploaded to PayNearMe’s SFTP service during account setup and the private key will be used by your client software to connect.

Creating SSH Keys on macOS, Linux, or UNIX

For macOS, Linux, or UNIX operating systems, use the ssh-keygen command to create an SSH public key and SSH private key, or a key pair. To create SSH keys on a macOS, Linux, or UNIX operating system, complete the following steps:

  1. Open a command terminal.
  2. At the prompt, enter the following command:
    ssh-keygen -P "" -m PEM -f key_name
    where key_name is the SSH key pair file name you would want to use.
  3. ssh-keygen will create two files. One will be the key name, which is the private key that you use when connecting to the SFTP server. The public key will have a .pub extension.
  4. Send the .pub key to PayNearMe to create your SFTP user account.

Creating SSH Keys on Microsoft Windows

Windows uses a slightly different SSH key pair format. The public key must be in the .pub format, and the private key must be in the .ppk format. On Windows, you can use PuTTYgen to create an SSH key pair in the appropriate formats. You can also use PuTTYgen to convert a private key generated using the ssh-keygen command to a .ppk file.

For a tutorial on creating SSH keys using PuTTYgen on Windows, see Using PuTTYgen on Windows to generate SSH key pairs on SSH.com.

Transferring Files

Once you’ve created the key pair and sent the public key to PayNearMe for account setup, you can begin transferring files using SFTP. You can access the SFTP server using a variety of SFTP client software as outlined in the Transferring files using a client topic in the AWS Transfer help documentation. While setting up your access, note the following important points:

  • The transfer-key or private key refers to the private key of the key pair that was created. You will need this key to connect.
  • The ftp_user or user is your user account name. This will usually be your email address and will be sent to you by PayNearMe after your account is created.
  • The service_endpoint is s-ea0ada81816844509.server.transfer.us-east-1.amazonaws.com
  • For Protocol use SFTP
  • For Port use 22

Example: Using OpenSSH SFTP CLI Command

  1. Open a command prompt
  2. At the prompt, enter the following command:
    sftp -i transfer-key sftp_user@s-ea0ada81816844509.server.transfer.us-east-1.amazonaws.com

An sftp prompt should appear, and you will now be in your home directory on the SFTP server.

You can use a variety of commands as outlined in the AWS link above, such as PUTs to transfer a file to the SFTP server, or mkdir to create sub-directories in your home directory.

Example: Using FileZilla SFTP with Windows Clients

  1. Open the FileZilla client.
  2. Choose File > Site Manager.
  3. In the Site Manager dialog box, choose New site.
  4. On the General tab, for Protocol, choose SFTP.
  5. For Host name, enter
    s-ea0ada81816844509.server.transfer.us-east-1.amazonaws.com.
  6. For Port Number, enter 22.
  7. For Logon Type, choose Key file.
  8. For User, enter the username given to you by your PayNearMe Account Manager.
  9. For Key file, click Browse and select your private key.
  10. Choose Connect.
  11. Once connected you may transfer files to and from your home directory.