1. Download the file from the server
scp username @ servername: / path / filename / var / www / local_dir ( local directory)
For example scp [email protected]: /var/www/test.txt /var/www/test.txt downloaded file on 192.168.0.101 to / var / www / local_dir (local directory)
2, upload local files to the server
scp / path / filename username @ servername : / path
E.g. scp /var/www/test.php [email protected]: / var / www / upload files in native test.php / var / www / directory to / var 192.168.0.101 on this server / www / directory
3, from the server to download the entire directory
scp -r username @ ServerName: / var / the WWW / remote_dir / (remote directory) / var / www / local_dir (local directory)
For example: scp -r [email protected]: / var / www / test / var / www /
4, upload directory server to
SCP -R & lt local_dir username @ ServerName: remote_dir
example: scp -r test [email protected]: / var / www / test directory of the current directory is uploaded to the server / var / www / directory
scp -r / Users / winyh / Desktop / angela / vant / docs [email protected].*8.2*6: / usr / share / nginx / html // prompted to enter the server password: XXX