FTP 101 – Part 15: Setting up an SFTP Connection with lftp or WinSCP
Published {$created} by Carsten Blum
SFTP (SSH File Transfer Protocol) is one of the safest ways to transfer files because it encrypts both your authentication and the file contents during transit.In this tutorial, we’ll look at how to set up an SFTP connection using two different tools:
lftp (command line, ideal for Linux and macOS)
WinSCP (graphical client for Windows)
To follow along you need a ftpGrid account, creating an account is just 3 minutes, and if you are in doubt, you can read more about why managed FTP/SFTP hosting is a good idea on our dedicated landing page.
Connecting with lftp
lftp is a powerful command-line file transfer program that supports SFTP out of the box.First, make sure lftp is installed:
Ubuntu/Debian: sudo apt install lftp
macOS (Homebrew): brew install lftp
Once installed, you can connect like this:
lftp -u your_username sftp://edge1.ftpgrid.com
You will be prompted for your password, unless you are using SSH keys.To upload a file:
put localfile.txt
To download a file:
get remotefile.txt
To exit lftp:
exit
Connecting with WinSCP (Windows)
WinSCP is a popular Windows SFTP client with a graphical interface.
Download and install WinSCP from https://winscp.net
Open WinSCP and in the login window:
File protocol: Select SFTP
Host name: edgeN.ftpgrid.com
Port number: 22
User name: Your ftpGrid SFTP username
Password or Private key file: Depending on your authentication method
Click Save to store the session for future use.
Click Login to connect.
You can now drag-and-drop files between your local computer and your ftpGrid account.
Why Choose SFTP?
Encrypted in transit: Protects credentials and file contents from interception.
Firewall-friendly: Uses a single port (22) for all transfers.
Flexible authentication: Supports both password and SSH key login.
SFTP is our recommended protocol at ftpGrid for secure, reliable, and GDPR-compliant file transfers.
Checkout our other FTP 101 tutorials on our tutorials page.