Generating SFTP (SSH) Keys


SFTP supports authentication using cryptographic keys, as opposed to a username and password. SFTP keys, when added in Files.com, provide access via SFTP only, and do not confer any access via APIs, SDKs, or the web.

We recommend generating SFTP Keys using the Files.com web interface, but we have also compiled tutorials for how to do this directly on Windows, Mac, and Linux.

Web Interface

Both users and administrators can generate SSH Key pairs within the Files.com web interface.

Users can generate their own SSH keys by logging in with their username and password, selecting their username at the top right of the page, selecting My account > SFTP keys > Add SFTP key, selecting the Generate in browser option, then selecting Generate key pair.

Site administrators can generate an SSH key for a user account. Type "SFTP/SSH Keys" in the search box at the top of every page and then click the matching result. Click Add SFTP key, and and select the Generate in browser option, then selecting Generate key pair.

You will only have one chance to copy or download the private key. Do not dismiss the private key information until you have copied or saved it to a secure location.

Windows

This guide requires you to use the PUTTYgen (free) open-source application. PUTTYgen is a standalone application that does not require you to install it. You can download a copy of this utility from the downloads page at the maintainer's website.

Generating compatible keys with PUTTYgen

Open the PUTTYgen application by double clicking on it.

Choose ED25519 for the Type of key to generate.

Click the Generate button.

Move your mouse around until the progress bar is full.

You now will have a generated public and private key.

Save the private and public key files to a location that only you can access and that you will not lose.

Right click in the text field labeled Public key for pasting into OpenSSH authorized_keys file and choose Select All.

Right click again and choose Copy.

Finally you need to add the SFTP public key to your Files.com account. Navigate to Settings > Users and click the the username of the appropriate user. Click the SFTP Keys setting, and paste the contents of your clipboard into the Public Key text area. For the Title you can enter any piece of identifying information that you want (for example, "my laptop").

MacOS

MacOS includes the necessary software to generate a key pair. Simply click the magnifying glass in the top right hand of your screen, type in Terminal and hit enter to open the application.

Create the new ED25519 Key

ssh-keygen -t ed25519

When prompted specify the path you want to save the key files in.

Enter file in which to save the key (/home/user/.ssh/id_ed25519):

If you wish to enter a passphrase for the private key you can enter it when prompted. A passphrase is not required for the private key though. If you do enter a passphrase you will have to type it in each time you use the private key.

Enter passphrase (empty for no passphrase):

Now that your key is generated you will want to copy it to your clipboard so that you can add it to your SFTP Keys.

pbcopy < ~/.ssh/id_ed25519.pub

Finally you need to add the SFTP public key to your Files.com account. Navigate to Settings > Users and click the the username of the appropriate user. Click the SFTP Keys setting, and paste the contents of your clipboard into the Public Key text area. For the Title you can enter any piece of identifying information that you want (for example, "my laptop").

Linux

Linux includes the necessary software to generate a key pair. Simply open your bash shell and type the following commands.

Create the new ED25519 Key.

ssh-keygen -t ed25519

When prompted specify the path you want to save the key files in.

Enter file in which to save the key (/home/user/.ssh/id_ed25519):

If you wish to enter a passphrase for the private key you can enter it when prompted. A passphrase is not required for the private key though. If you do enter a passphrase you will have to type it in each time you use the private key.

Enter passphrase (empty for no passphrase):

Now that your key is generated you will want to copy it to your clipboard so that you can add it to your SFTP Keys.

xclip -sel clip < ~/.ssh/id_ed25519.pub

Finally you need to add the SFTP public key to your Files.com account. Navigate to Settings > Users and click the the username of the appropriate user. Click the SFTP Keys setting, and paste the contents of your clipboard into the Public Key text area. For the Title you can enter any piece of identifying information that you want (for example, "my laptop").

Get Instant Access to Files.com

The button below will take you to our Free Trial signup page. Click on the white "Start My Free Trial" button, then fill out the short form on the next page. Your account will be activated instantly. You can dive in and start yourself or let us help. The choice is yours.

Start My Free Trial

©2024 Files.com. All right reserved

FILES.COM

  • Start My Free Trial
  • Pricing
  • Docs
  • API and SDKs
  • Contact

CONTACT & SUPPORT

support@files.com

(800) 286-8372

Monday–Friday

9am–8pm Eastern