Linux SCP remote File/directory Transfer
1. Get the files on the remote server
[Email protected]:/root/test. Tar.gz/home/test. tar.gz
Upper Port Capital P is the parameter, 22 means change the port that connects SSH, if not change the default SSH port can not add this parameter. [email protected] test.com means to log on to the remote server www using the root user. test.com:/root/test.tar.gz represents a file on a remote server, and the last/home/test.tar.gz represents the path and file name saved locally.
2. Get the directory on the remote server
scp-r [email protected]:/root/testdir /home/testdir/
The-r parameter indicates a recursive copy (that is, the files and subdirectories below the directory),/root/testdir/represents a directory on the remote server, and the/home/testdir/on the last side represents the path saved locally.
3. Upload the local file to the server
SCP /home/upload. tar.gz [email protected]:/root/upload. tar.gz
Other common parameters are
-4 mandatory use of IPv4
-6 mandatory use of IPv6
-V is the same as-V in most Linux commands to show progress. Can be used to view connections, certifications, or configuration errors.
-C Enable to compress
Above is the Linux host to use SCP connection upload download file
Under win you can directly use the WinSCP to manage VPS Server files and more convenient
Linux SCP remote File/directory Transfer