1, download files from the server
SCP username@servername:/path/filename/var/www/local_dir (local directory)
For example, the SCP root@192.168.0.101:/var/www/test.txt downloads/var/www/test.txt files 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
For example, scp/var/www/test.php root@192.168.0.101:/var/www/upload test.php files from the native/var/www/directory to 192.168.0.101 on this server In the Directory
3, download the entire directory from the server
Scp-r username@servername:/var/www/remote_dir/(remote directory)/var/www/local_dir (local directory)
For example: Scp-r root@192.168.0.101:/var/www/test/var/www/
4, upload directory to the server
Scp-r Local_dir Username@servername:remote_dir
For example: Scp-r test root@192.168.0.101:/var/www/uploads the test directory in the current directory to the server's/var/www/directory
Note: The target server will open write permission.