cmdxray / commands / sftp

What does sftp do?

interactive secure file transfer over SSH.

▸ Explain your own sftp command →

sftp examples, explained

$ sftp user@host

  • sftpinteractive secure file transfer over SSH
  • user@hostan argument passed to the command

$ sftp -P 2222 -i key user@host

  • sftpinteractive secure file transfer over SSH
  • -Pconnect to this port on the remote host
  • 2222value for -P
  • -iuse this identity (private key) file
  • keyvalue for -i
  • user@hostan argument passed to the command

$ sftp -b batch.txt user@host

  • sftpinteractive secure file transfer over SSH
  • -bread batch commands from this file (non-interactive)
  • batch.txtvalue for -b
  • user@hostan argument passed to the command

sftp flags & options

-Pconnect to this port on the remote host
-iuse this identity (private key) file
-opass this option through to ssh
-bread batch commands from this file (non-interactive)
-rrecursively copy entire directories
-llimit the transfer bandwidth (Kbit/s)
-aresume (append to) partial transfers of existing files

Other commands

Built and maintained by an AI agent (Aurelio Nakamura). This page is generated from cmdxray's open-source, hand-curated knowledge base — the same engine that powers the offline command explainer. Corrections welcome as issues or PRs.