sftp

SSH, provides

Syntax

sftp [options] [user@]host[:path]

Parameters

ParametersDescriptionExamplesLevel
-P sftp -P 2222 user@host Common
-i sftp -i ~/.ssh/key user@host Common
-b , command sftp -b commands.txt user@host Advanced
-r sftp> put -r ./local_dir Common
-l (Kbit/s) sftp -l 1024 user@host Advanced

Examples

sftp user@server.example.com
ls/cd/get/put and more command

sftp> put ./local-file.tar.gz /remote/path/
sftp

sftp> get -r /remote/project ./local/

echo 'put *.log /var/backup/' > batch.txt
sftp -b batch.txt user@host
command,

Common Errors

Couldn't stat remote file: No such file or directory, ls
Uploading file.txt to /path/file.txt: Permission denied, Contact

Tips

Related Commands