Copy a file from a remote host to a local directory

scp

  • Secure copy.
    Copy files between hosts using Secure Copy Protocol over SSH.
    More information: <https://man.openbsd.org/scp>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

scp {{remote_host}}:{{path/to/remote_file}} {{path/to/local_directory}}

click the source code to copy install scp on any operating system with command-not-found.com