scp from server code example
Example 1: scp to remote server
scp ./file.txt remote_username@remote_ip:/remote/directory
Example 2: scp server to local
scp [email protected]:/remote/file.txt /local/directory
Example 3: copy from remote server
scp -i <KEY CERTIFICATE | .ppk or .pem file> <source URL of local server or remote server> <destination URL of local server or remote server>
Example 4: how to scp from server to local
scp [email protected]:/root/Jmeter/reports.jtl Downloads/