Sobes.tech
Junior — Middle

Which tool in Linux is used for secure file transfer over the network, similar to scp?

sobes.tech AI

Answer from AI

For secure file transfer over a network in Linux, similar to the scp command, the utility rsync with SSH support is used. It allows copying files and directories between local and remote machines with encryption and the ability to resume transfers.

Example of using rsync to copy a file to a remote server:

rsync -avz -e ssh /path/to/file user@remote_host:/destination/path/

Where:

  • -a — archive mode (preserves permissions, symbolic links, etc.)
  • -v — verbose output
  • -z — data compression during transfer
  • -e ssh — use SSH for security

Besides rsync, sftp can also be used — an interactive client for file transfer over SSH.