Skip to content

Instantly share code, notes, and snippets.

@samazgor
Last active March 28, 2025 02:03
Show Gist options
  • Save samazgor/648af06becf83a26a41afaeedef16836 to your computer and use it in GitHub Desktop.
Save samazgor/648af06becf83a26a41afaeedef16836 to your computer and use it in GitHub Desktop.
SCP command for upload files from one server to another

Command

scp foo.zip username@TARGET_HOST:~/TARGET_PATH

Copy directory

scp SOUR_DIR username@TARGET_HOST:~/TARGET_PATH

@samazgor
Copy link
Author

Copy entire directory to another host.

scp -r /home/user/folder username@TARGET_HOST:/home/user

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment