SSH File Transfer
Recently, it was found using git connection Git included ssh, ssh and then they discovered also supports file transfer.
Simple file transfer can be carried out using ssh, ssh and transfer faster and more secure than ftp.
The following is a brief introduction:
- SSH File Upload
scp -P 22 -r directory user@host:/www/wwwroot/
Detailed parameters:
-P (P must be capitalized): port number
-r: If you need a directory in the directory before adding -r
user @ host address: the need to upload directory
- SSH File Download
scp -P 22 -r user@host:/www/wwwroot/ c:/user/aa/
Detailed parameters:
-P (P must be capitalized): port number
-r: If you need a directory in the directory before adding -r
user @ host address: the need for local directory upload directory
Note :-P parameter without a default port
to upload the default directory for the user's home directory
to download the default directory to the current directory