Main Tutorials

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.

About Author

author image
Founder of Mkyong.com, love Java and open source stuff. Follow him on Twitter. If you like my tutorials, consider make a donation to these charities.

Comments

Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments