Page tree

Welcome to FreeSoftwareServers Confluence Wiki

Skip to end of metadata
Go to start of metadata

https://haydenjames.io/linux-securely-copy-files-using-scp/

uname=
from_host=
to_host=

Copy file from a remote host to local host SCP example:

scp "$uname"@"$from_host":/remote/file.txt /local/directory/

Copy file from local host to a remote host SCP example:

scp /local/file.txt "$uname"@"$to_host":/remote/directory/

Copy file from remote host to remote host SCP example:

scp "$uname"@"$from_host":/remote/directory/file.txt "$uname"@"$to_host":/remote/directory/
  • No labels