Moving files between your Mac and a remote server is one of the most common tasks in development. Whether you're deploying code, pulling logs, or editing config files, you need a reliable way to transfer files over SSH.
SFTP (SSH File Transfer Protocol) is the standard. It's secure, fast, and works over your existing SSH connection. Here's how to use it.
SFTP from the Command Line
macOS has SFTP built in. Open Terminal and connect:
sftp user@yourserver.com
Once connected, you can use these commands:
# Upload a file
put localfile.txt /remote/path/
# Download a file
get /remote/path/file.txt ./local/
# Upload a directory
put -r ./my-folder /remote/path/
# Download a directory
get -r /remote/path/folder ./local/
# List remote files
ls
# Change remote directory
cd /var/www
# List local files
lls
# Change local directory
lcd ~/Downloads
This works fine for quick transfers, but it gets tedious for anything more than a few files.
Using scp for Quick Transfers
If you just need to copy a single file, scp is faster than starting an SFTP session:
# Upload
scp ./deploy.zip user@server:/var/www/
# Download
scp user@server:/var/log/app.log ./logs/
# Upload a directory
scp -r ./dist user@server:/var/www/html/
scp is great for scripting and one-off transfers. For interactive file management, SFTP is better.
Using rsync for Large Transfers
For syncing large directories or deploying code, rsync is the best tool:
# Sync local directory to remote
rsync -avz --progress ./dist/ user@server:/var/www/html/
# Sync remote to local
rsync -avz user@server:/var/log/ ./logs/
# Dry run (preview changes)
rsync -avz --dry-run ./dist/ user@server:/var/www/html/
rsync only transfers files that changed, so it's much faster than copying everything. The -z flag compresses data in transit.
GUI SFTP Clients for macOS
Command-line SFTP is powerful, but sometimes you just want to drag and drop. Here are your options:
Cyberduck — Free, open-source. Connects to SFTP, S3, Google Cloud, and more. The UI is functional but dated.
Transmit — $45, Panic's macOS-native file transfer app. Beautiful UI and fast. But it's just a file transfer tool — no terminal, no SSH.
FileZilla — Free, cross-platform. Gets the job done but the interface is cluttered, and the installer has been known to bundle adware.
Pluto Door — $12 one-time. Has a built-in SFTP file browser alongside an SSH terminal, code editor, and AI assistant. You can browse files, edit them remotely, and run commands — all in one window. Useful when you need to do more than just move files.
Setting Up SSH Config for Faster Connections
Instead of typing the full server address every time, add your servers to ~/.ssh/config:
Host myserver
HostName 192.168.1.100
User deploy
IdentityFile ~/.ssh/id_ed25519
Now you can just type:
sftp myserver
scp file.txt myserver:/path/
rsync -avz ./dist/ myserver:/var/www/
Which Method Should You Use?
- Quick single file →
scp - Interactive browsing →
sftpor a GUI client - Syncing directories / deploying →
rsync - Regular file management + terminal → a dedicated app like Pluto Door
Pick the right tool for the job. For most developers, having rsync for deploys and a GUI client for everyday file management is the sweet spot.
