scp -r /home/administrator/test/ [email protected]:/root/
2. Copy a single file to a remote host:
scp /home/administrator/Desktop/old/driver/test/test.txt [email protected]:/root/
In fact, the difference between uploading files and folders lies in the parameter -r, which is similar to the parameters of cp and rm, and the text increases with multiple -r
3. Remote file/folder download For
example , put the /root/ folder on 192.168.62.10, Download it to the local /home/administrator/Desktop/new/ and log in using the root of the remote end
scp -r [email protected]:/root/ /home/administrator/Desktop/new/