在Windows的Golang中使用SCP在远程UNIX主机中复制远程文件

Is needed to copy remote files in a linux server to a windows local server and I want to know if is possible to use golang (with standard lib or not and the process will be runnning on windows) to accomplish this task, or even the way could be to call another process like winscp.

There are two ways to approach this problem:

  • Use library to execute SCP protocol. There isn't any standard library in golang for SCP protocol. But you can use this library for SCP protocol.

  • Use OS binary to execute SCP protocol. But please keep in mind that, in this case your program can only run on machine, which has this particular OS binary installed.