scp send file code example
Example 1: scp send file
scp ./file.txt remote_username@remote_ip:/remote/directory
Example 2: bash How To Transfer Files From a Remote Server to another Remote Server
scp source destination
scp /Users/name/Downloads/*.txt [email protected]:/path/to/directory
scp [email protected]:/path/to/directory/*png /Users/name/Downloads
scp [email protected]:/path/to/directory/my_favorite_file.txt [email protected]:/path/to/directory
scp -r [email protected]:/path/to/directory /Users/name/Downloads
Example 3: scp folder from server to local
scp -r [email protected]:/path/to/foo /home/user/Desktop/
Example 4: using scp
scp [email protected]:/remote/file.txt /local/directory
Example 5: copy from remote to local
scp file.txt [email protected]:/remote/directory
Example 6: scp send file to remote
dragonmnl@local $ scp -P 2222 file.ext username@domain:~/