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 [email protected]:/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 [email protected]:/uploads
Note
For detail example, please visit this SCP command examples

Done.

mkyong

Founder of Mkyong.com, passionate Java and open-source technologies. If you enjoy my tutorials, consider making a donation to these charities.

0 Comments
Most Voted
Newest Oldest
Inline Feedbacks
View all comments