How to Set Up Secure File Transfer with SFTP
Got an invoice to deliver, a batch of reports to distribute, or a business partner waiting for their daily data drop? With this SFTP guide, you can get those files where they need to be without building an API, provisioning a server, or sending sensitive information as email attachments.
To set up secure file transfer with SFTP, you'll need an SFTP server, a client, and login credentials. A managed cloud SFTP service takes care of the server and storage, leaving you to decide who gets access, which files they can exchange, and what happens to those files when they arrive.
We're going to get a secure file transfer up and running using SFTP To Go, upload and download a few files, and then put some of that file-moving business on autopilot. No server maintenance or programming required. Grab a file and follow along!
What do you need to set up SFTP?
SFTP (SSH File Transfer Protocol) transfers files between a client and server through an encrypted SSH connection. Unlike FTP, it protects authentication information and file contents during transfer.
You'll need the three components below, but with SFTP To Go, you already have a managed server and login credentials. All you need to bring is your chosen SFTP client.
- SFTP server: Receives and stores files, authenticates users, and determines which files and directories they can access.
- SFTP client: The application, command-line utility, or software integration that connects to the server.
- SFTP credentials: The hostname, username, port (typically
22), andpasswordorSSH keyauthentication.
For business file exchange, you'll also want encrypted storage, restricted folder access, and records of who transferred what, and all of this is included with SFTP To Go.
Step 1: Choose and set up your SFTP server
You have two main options: host one yourself or use a managed cloud SFTP service. You can configure OpenSSH on Linux or Windows, but you'll also be responsible for operating system maintenance, network access, storage, security updates, availability, and recovery.
SFTP To Go is a cloud-native, fully managed file transfer (MFT) service with Amazon S3-backed storage, SFTP, FTPS, HTTPS and S3 API access, native file automation, and audit logging.
- Sign up for SFTP To Go and select a trial plan.
- Enter the requested account and organization information and sign in to your
Dashboard. - Open
Credentialsand expand the initial root credentials to find your connection details.
Your SFTP environment is ready without installing server software or configuring cloud storage separately. Now let's give someone a file to work with.
Step 2: Create SFTP credentials and control file access
SFTP To Go provides initial root credentials (i.e. default credentials) with full access to your cloud storage. They're useful for administering files, but you wouldn't want to hand them out to every supplier, customer, and application that needs to connect.
Imagine you're sending invoices to an external accounting partner. They need to retrieve invoices from a particular folder, but they have no business browsing your other financial records or modifying your files.
- Create an
outgoing-invoicesfolder using theFile browser. - Open
Credentialsand select+ Add credentials. - Enter a unique username of of between 5 and 100 characters, or leave it blank to have one auto-generated.
- Set the home directory to
/outgoing-invoicesand chooseRead-onlypermissions. - Optionally set an expiration date and nickname, then add the credentials.
Your accounting partner now has separate credentials restricted to the invoice directory. Alternatively, set up an expiring Share link for one time access.
Choose the right file permissions
Read-only: Retrieve files.Write-only: Submit files without downloading or overwriting existing files.Read and Write without delete: Exchange files without deleting them.Read and Write: Upload, download and delete files.Full access: Everything, also permits creation of ShareLinks.None: No file operations. Useful for suspending access for a while.Virtual folders: These allow access to additional mapped locations with individual permissions.
Authenticate with a password or SSH key
Passwords are convenient for getting started, but SSH keys are particularly useful for recurring transfers between applications. Generate an Ed25519 key pair using OpenSSH:
ssh-keygen -t ed25519
Follow the prompts to save the key pair. For interactive use, protect your private key with a passphrase. Expand the relevant credential under Credentials, select Import SSH key, paste the contents of your public key file (ending in .pub), and import it. Keep the private key securely on the connecting system.
Step 3: Choose your SFTP client
How do you like to work? With a terminal window, a graphical application, or an integration that quietly exchanges files in the background? SFTP accommodates all three.
- Command-line clients: OpenSSH provides the sftp utility on macOS, Linux and Windows when installed.
- Graphical clients: These offer visual file browsing and drag-and-drop transfers. Explore our guide to the best SFTP clients to choose one.
- Application integrations: Programming libraries, integration platforms and business applications can connect to SFTP automatically.
For this walkthrough, we'll show you how to connect and exchange files using either a graphical SFTP client of your choice or the command line. Choose whichever method you prefer.
Prefer to skip the SFTP client altogether?
When enabled, SFTP To Go's HTTPS web portal lets authorized users manage files from a browser, subject to assigned permissions. Organizations can enforce MFA for web portal users.
Step 4: Connect to your SFTP server
Connect using a graphical SFTP client
Open your preferred graphical SFTP client. The exact interface and field names vary between applications, but the connection process is generally the same:
- In your SFTP To Go dashboard, open
Credentialsand expand the credential you want to connect with. - Create a new
connectionorconnection profilein your client (terminology is client-dependent). - Select SFTP as the connection protocol, enter your SFTP To Go
hostname, and specify port22. - Enter your
usernameandpassword, or configureSSH keyauthentication using yourusernameand the correspondingprivate key. - Initiate the connection. If prompted to trust the server's host key, check that its fingerprint matches the one for your hostname before accepting it. Here's how to get your host key fingerprint.
Once connected, you can browse the remote directories permitted by your credentials. See our SFTP connection documentation for further instructions.
Connect using the command line
Open Terminal on macOS or Linux, or PowerShell on Windows. The basic OpenSSH command is:
sftp username@hostname
Replace the placeholders with your connection details. SFTP uses port 22 by default. To specify it explicitly, use uppercase -P:
sftp -P 22 username@hostname
For SSH private key authentication, use -i and the path to your private key:
sftp -i ~/.ssh/id_ed25519 username@hostname
On your first connection, check the server's SSH host key fingerprint before accepting it (see how to get it). Authenticate as configured. Once connected, you'll see:
sftp>
You're in! Time to send your first file.
Step 5: Upload and download files securely
Let's return to our invoice example. We'll use credentials with write access to upload invoices and the accounting partner's read-only credentials to retrieve them.
Transfer files using a graphical SFTP client
Once connected to SFTP To Go, use your preferred client's upload and download functions to exchange files within the directories and permissions assigned to your credentials. The exact process varies by application. Our guide to the best SFTP clients can help you choose a client that suits your workflow.
Upload and download files directly from SFTP To Go
Prefer to work in your browser? Dashboard users can manage their organization's files using the built-in File browser, which uses the root credentials. Alternatively, employees and business partners can sign in to the HTTPS web portal using their own credentials, provided the portal is enabled in the organization's settings.
- Open
File browserin the dashboard, or sign in to your organization's web portal with credentials that permit uploads. - Navigate to the
outgoing-invoicesfolder, or to the home directory if your credentials are already restricted to that folder. - Select
+beside the current folder, chooseUpload files, then dropinvoice-001.jsoninto the upload area or selectbrowse filesto locate it. - Have your accounting partner sign in to the web portal using their read-only credentials. Their assigned invoice directory appears as their root.
- To retrieve the invoice, open its three-dot menu and select
Download.
Both browser-based methods use HTTPS rather than the SFTP protocol. For more details, see our File browser and web portal documentation.
Transfer files using the command line
If you prefer the terminal, use the following commands to exchange the same invoices.
Upload files using the put command
Connect with the initial root credentials for this demonstration and run the following from the local directory containing the invoice:
put invoice-001.json /outgoing-invoices/
Want to send several matching invoices at once? Use a wildcard:
put invoice-*.json /outgoing-invoices/
List files using the ls command
Your partner connects using their separate read-only credentials. Their assigned home directory appears as their accessible root.
ls
Example output: invoice-001.json invoice-002.json invoice-003.json
Download files using the get command
get invoice-001.json
The file is downloaded to the current local directory. To download several matching files:
get invoice-*.json
And there you have it. You've established a controlled file exchange without sharing administrative credentials or exposing unrelated business files.
Handy SFTP commands
pwd: Current remote directory.lpwd: Current local directory.ls: List remote files.lls: List local files.cd: Change remote directory.lcd: Change local directory.mkdir: Create remote directory if permitted.put: Upload files.get: Download files.exit: Close session.
For more examples, bookmark our SFTP commands cheat sheet.
Step 6: Secure your SFTP environment
SFTP encrypts data during transfer. SFTP To Go also encrypts stored files using AES-256 on Amazon S3.
- Separate credentials: Give every partner, employee or application its own credentials.
- Restricted permissions: Grant access only to necessary folders and operations.
- SSH key authentication: Use dedicated key pairs for recurring system transfers and rotate them periodically.
- IP allowlisting: On supported plans, restrict incoming connections to approved addresses. Use SFTP To Go's static IP addresses for firewall allowlisting.
- MFA: Admin MFA is required, and organizations can enforce MFA for web portal users.
- Audit logs: Review authentication, file transfer and administrative activity. Export logs or configure supported streaming destinations where available.
- Access expiration: Set expiration dates for temporary credentials.
SFTP To Go manages infrastructure and storage encryption. Your team controls users, permissions, authentication and file exchange policies.
Step 7: Automate your SFTP file transfers
Sending three invoices manually is easy enough. Sending three hundred every week? That's a job worth delegating.
SFTP To Go's native file automations let you configure workflows triggered by file events or schedules.
Create your first automated file workflow
Suppose you want to archive incoming supplier invoices and notify your finance team.
- Create
incoming-invoicesandinvoice-archivedirectories. - Create an automation with a
File createdevent trigger. - Filter the path to start with
incoming-invoices/(without a leading slash) and restrictTypetoFile. - Add a
Copy file or folderaction, using the triggering file as source and the archive folder as destination inYour storage. - Add a
Send emailaction and configure the recipient and notification source. - Save, upload a uniquely named test invoice and review execution history.
- For detailed instructions, tread the automation documentation.
Send files to another server or cloud storage service
Reusable storage connections support SFTP, FTPS, Amazon S3, S3-compatible storage and WebDAV on eligible plans. Test and save a connection before referencing it in supported copy or move actions.
For example, receive an invoice over SFTP, apply PGP encryption using a configured key, copy the encrypted output to a partner's SFTP server and notify your finance team. Management APIs and native webhook actions support additional integrations.
Troubleshooting common SFTP connection problems
- Connection timed out: Check
hostname,port,firewalland permittedIPaddresses. - Connection refused: Confirm
endpointandport. - Authentication failed: Check
username,password,SSH key pairand authentication settings. - Permission denied: Confirm the credential permits the operation.
- No such file or directory: Check local and remote paths and assigned home directory.
- Host key verification failed: Verify the current fingerprint with the provider before changing trusted host key records.
SFTP To Go also offers alternative SFTP ports 2222 and 22000.
Ready to get your files moving?
You've now got everything you need to establish an SFTP connection, exchange files securely, control access, and automate repetitive file operations.
Whether you're distributing financial reports, receiving customer uploads, exchanging EDI documents, or connecting business applications, you can run those workflows through SFTP To Go without maintaining file transfer infrastructure. For recipients without an SFTP client, there's also the web portal and secure ShareLinks.
Try SFTP To Go and get your first secure file transfer underway.
Frequently asked questions
Obtain access to an SFTP server, create credentials with appropriate folder permissions, connect using an SFTP client, authenticate, then upload with put or download with get.
Do I need my own server to use SFTP?No. SFTP To Go provides managed transfer infrastructure and encrypted cloud storage.
Can I use SFTP on Windows, macOS, and Linux?Yes. OpenSSH and graphical SFTP clients are available across these operating systems.
What port does SFTP use?Typically TCP port 22. SFTP To Go also supports ports 2222 and 22000.
Is SFTP secure enough for sensitive business files?SFTP encrypts data during transmission. Sensitive workflows also require restricted access, secure authentication, encrypted storage and auditing.
Can I automate SFTP file transfers without writing code?Yes. On eligible plans, SFTP To Go supports file and schedule triggers with actions for copying, moving, PGP encryption, compression and notifications.
Can someone access my SFTP files without an SFTP client?Yes. SFTP To Go offers an HTTPS web portal and ShareLinks for authorized browser-based access.