Skip to content

Instantly share code, notes, and snippets.

@FoxNeo
Created February 12, 2021 14:06
Show Gist options
  • Save FoxNeo/4fd0f06ef61aea1cdadb0fc1688d3bbf to your computer and use it in GitHub Desktop.
Save FoxNeo/4fd0f06ef61aea1cdadb0fc1688d3bbf to your computer and use it in GitHub Desktop.
scp example upload and download

scp

SSH authentication is required!

How it works?

source: https://linuxize.com/post/how-to-use-scp-command-to-securely-transfer-files/

scp [OPTION] [user@]SRC_HOST:]file1 [user@]DEST_HOST:]file2

Download from Server to local

$ scp myuser@server.domain.co:/home/myuser/file.txt ~/local-user/file.txt

Upload from local to server

$ scp ~/file.txt userssh@server.domain.co:/home/userssh/file.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment