Transfer a file to an SFTP destination.
Section: Uploads
Upload a file over SFTP
bash
bash
curl -u user:pass -T ./backup.sql sftp://example.com/home/user/backup.sqlExplanation
curl supports SFTP as well as HTTP and HTTPS.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Uploads
Append to a remote file
Append uploaded data when the protocol and server support it.
Retry on all errors
Retry on all errors, including transient HTTP failures when appropriate.