将pscp.exe 放到 C:\Windows\System32
这样在任何cmd进入的目录下都能调用pscp命令了!
http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe
pscp只要你远程机器开了SSHD这个服务,你就可以使用这个命令传输文件了。
从远程机器传文件到本机:
pscp username@hostname:remotefile localdirectory
从本地传文件到远程机器:
pscp localfile username@hostname:remotefile
这个过程需要你输入密码的,密码就是你登陆的putty使用的密码
如果你觉得每次手动输入密码很麻烦你就直接在批处理中加入密码,这样上面的命令就变成了:
pscp -pw password localfile username@hostname:remotefile
http://blog.youkuaiyun.com/leohwang/article/details/8007895