Modern SFTP/SCP client with saved connections, interactive shell, batch commands, directory sync, and resumable transfers -- all in a single binary.
A clean CLI alternative to WinSCP and FileZilla.
Download the latest release for your platform from the releases page.
go install github.com/jmsperu/sftpgo@latestgit clone https://github.com/jmsperu/sftpgo.git
cd sftpgo
make build# Save a connection
sftpgo add prod deploy@server.example.com -p 2222 -i ~/.ssh/id_ed25519
# Open interactive SFTP shell
sftpgo connect prod
# Upload / download
sftpgo put ./release.tar.gz prod:/opt/releases/
sftpgo get prod:/var/log/app.log ./logs/
# Sync a directory
sftpgo sync ./build prod:/var/www/html --deleteSave a named connection for later use.
sftpgo add <name> <user@host>
sftpgo add staging admin@staging.example.com
sftpgo add prod deploy@prod.example.com -p 2222 -i ~/.ssh/deploy_key| Flag | Description |
|---|---|
-p, --port |
SSH port (default 22) |
-i, --key |
Path to private key file |
Open an interactive SFTP shell with tab completion. Accepts a saved connection name or user@host.
sftpgo connect prod
sftpgo connect admin@server.example.com
sftpgo connect admin@server.example.com -p 2222| Flag | Description |
|---|---|
-p, --port |
SSH port override |
-i, --key |
Path to private key |
Download a file or directory from a remote server.
sftpgo get prod:/etc/nginx/nginx.conf ./local/
sftpgo get prod:/var/backups/ ./backups/ --resume| Flag | Description |
|---|---|
--resume |
Resume an interrupted transfer |
Upload a file or directory to a remote server.
sftpgo put ./release.tar.gz prod:/opt/releases/
sftpgo put ./website/ prod:/var/www/html/ --resume| Flag | Description |
|---|---|
--resume |
Resume an interrupted transfer |
Sync a local directory to a remote directory (upload only).
sftpgo sync ./build prod:/var/www/html
sftpgo sync ./build prod:/var/www/html --delete| Flag | Description |
|---|---|
--delete |
Delete remote files not present locally |
Execute SFTP commands from a file, one per line. Lines starting with # are ignored.
sftpgo batch prod commands.txtSupported batch commands: ls, cd, get, put, mkdir, rm, pwd.
List all saved connections.
sftpgo list
sftpgo ls| Flag | Description |
|---|---|
--config |
Config file path (default ~/.sftpgo.yml) |
Saved connections are stored in ~/.sftpgo.yml:
connections:
prod:
host: server.example.com
port: 22
user: deploy
key_file: ~/.ssh/deploy_key
staging:
host: staging.example.com
port: 2222
user: adminMIT