scp ./app.tar.gz user@example.com:/tmp/Copy a local file to a remote host.
SSH-based file transfer with scp and sftp, including recursive copies, jump hosts, interactive commands, and batch mode.
Copy files and directories over SSH.
scp ./app.tar.gz user@example.com:/tmp/Copy a local file to a remote host.
scp user@example.com:/var/log/app.log ./Copy a remote file to the current directory.
scp -r ./site/ user@example.com:/var/www/site/Copy a full directory tree to a remote host.
scp -P 2222 ./file.txt user@example.com:/tmp/Specify an alternate SSH port for scp.
scp -i ~/.ssh/id_ed25519 ./file.txt user@example.com:/tmp/Specify a private key file for transfers.
scp -p ./file.txt user@example.com:/tmp/Keep file times and modes during copy.
scp -J bastion.example.com ./db.dump user@private.internal:/tmp/Transfer via a bastion host.
Interactive and batch SFTP usage.
sftp user@example.comStart an interactive SFTP shell.
sftp -P 2222 user@example.comSpecify a non-default SSH port for SFTP.
sftp -b batch.txt user@example.comExecute SFTP commands from a batch file.
Continue downloading a partially transferred file.
reget backup.tar.gzContinue downloading a partially transferred file.
reput backup.tar.gzContinue uploading a partially transferred file.
put ./archive.zip /tmp/archive.zipPut a file during an interactive session.
get /var/log/app.log ./app.logGet a file during an interactive session.