putty作为ssh工具开源免费,简单易用。可是如何使用它来上传和下载文件呢?答案在于pscp。

pscp下载地址:http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

pscp是一个命令行工具,也就是说,别指望双击它来运行。你需要一个命令行工具,像window的dos,然后把目录切换到pscp.exe所在的目录。

使用putty上传下载文件(pscp)

接下来就可以使用命令来上传和下载文件了。使用格式如下:

Usage: pscp [options] [user@]host:source target
       pscp [options] source [source...] [user@]host:target
       pscp [options] -ls [user@]host:filespec

上传文件:

pscp [options] source [source...] [user@]host:target
pscp D:\source.txt root@192.168.0.3:/tmp/
//把D盘下的source.txt文件上传到192.168.0.3(我的虚拟机)这个服务器下的/tmp/目录中。

下载文件:

pscp [options] [user@]host:source target
pscp root@192.168.0.3:/tmp/source.txt D:\
//192.168.0.3(我的虚拟机)这个服务器/tmp/目录下的source.txt下载到D盘下。

列出远程服务器:

pscp -ls root@192.168.0.3:/tmp
//列出/tmp目录下的文件。

具体的参数说明,见:http://the.earth.li/~sgtatham/putty/0.63/htmldoc/Chapter5.html#pscp

相关文章:

  • 2021-11-15
  • 2021-11-24
  • 2022-02-07
  • 2022-12-23
  • 2022-12-23
  • 2021-11-05
  • 2021-09-23
  • 2022-12-23
猜你喜欢
  • 2022-02-10
  • 2022-01-28
  • 2022-12-23
  • 2021-12-27
  • 2021-12-08
  • 2021-08-27
  • 2022-01-07
相关资源
相似解决方案