下载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\"