Secure Copy scp Syntax

Refer: https://phoenixnap.com/kb/linux-scp-command

Copy Files from Remote with Wildcard

scp x_ubuntu1804_ci:"/home/mruckman/crontab/*.zip" .

Single File

scp /your/source/file-to-copy.zip  xxx@target.server.com:/tmp/file-to-copy.zip

Single File Copied from Server

scp x_ubuntu1804_ci:/home/mruckman/sos-api-deployment-analysis/server_report.xls ~/Desktop/

Recursive Copy

scp -r user@server1:/var/www/html/ /var/www/ - it doubled created the target folder on RHEL server

or

scp -r user@server1:/var/www/html/ user@server2:/var/www/html/ - this has been untested

Leave a Reply