下載pscp.exe,放在 windows/system32目錄裏,任何路徑下即可直接調用命令 pscp 。
用法:
1) 把本地文件file傳輸到Linxu服務器的/tmp/
E:\pscp.exe file
[email protected]:/tmp/
2) 把本地目錄dir、文件file傳輸到Linux服務器的/tmp/,並指定服務器端口2009
E:\pscp.exe -P 2009 -r dir file
[email protected]:/tmp/
3) 把服務器上的/tmp/file文件取回本地當前目錄
E:\pscp.exe
[email protected]:/tmp/file "D:\file"
E:\pscp.exe -r [email protected]:/tmp/dir "D:\data\"