Download file from server using SSH
Normally, you use Secure copy or SCP to download a file from another server via SSH connection. For example,
scp username@remotehost:remoteFileToDownload localFolderNameToSaveTheFile
1. SCP Examples
1.1 Download File From Server
Example to download a log file (hc.audit.log) from server (198.58.x.x), into your current local folder.
scp mkyong@198.58.x.x:/var/log/tomcat7/hc.audit.log .
1.2 Upload File To Server
Example to upload a hc.war file to server (198.58.x.x) ~/uploads folder.
scp hc.war mkyong@198.58.x.x:/uploads
For detail example, please visit this SCP command examples
Done.