Sobes.tech
Senior

What utilities can be used to connect to a remote Linux server and copy files to a local machine?

sobes.tech AI

Answer from AI

To connect to a remote Linux server and copy files to a local machine, the following utilities are often used:

  • ssh — for remote connection to the server.
  • scp — for copying files between the local and remote machines via SSH.
  • rsync — for synchronizing and copying files with the possibility of incremental updates.

Example of copying a file from a remote server to a local machine using scp:

scp user@remote_host:/path/to/remote/file /path/to/local/destination

To connect:

ssh user@remote_host

rsync example:

rsync -avz user@remote_host:/path/to/remote/file /path/to/local/destination