scp 是一个方便在主机与主机之间拷贝文件的命令,这个命令可以帮你省下很多不必要的数据传输麻烦。
直接上手
# 从你的主机拷贝到目标主机
# 路径建议写绝对路径
scp current_linux_file_path hostname@ip_addrr:destination_linux_path
# 从目标主机拷贝文件到本地
scp user@your.server.example.com:/path/to/foo /home/user/Desktop/
# 有时候需要拷贝的是整个文件夹
# 加上 -r就可以了
scp -r current_linux_file_path hostname@ip_addrr:destination_linux_path
参考
https://stackoverflow.com/questions/11304895/how-do-i-copy-a-folder-from-remote-to-local-using-scp