When using PSCP, users may find themselves bound by the restrictive 16k window size, resulting in unsatisfactory performance from their log file uploads.
Using Cygwin and the OpenSSH package, we can benefit from the larger window size OpenSSH uses. This FAQ is here to provide a basic, generic guide to installing and using cygwin for this purpose.
Download and run the Cygwin setup file, hit [ Next > ], leave the top radio option selected and hit [ Next > ] again.
Choose a suitable path for your cygwin installation, and select the most suitable "Install For" setting for your deployment.
The directory specified on the subsequent page is just a temporary directory for downloading the install packages prior to installation, hit [ Next > ]
Apply the necessary settings to help the Cygwin installer to get to the internet, and hit [ Next > ]:
Cygwin will retrieve a list of mirrors, and on the subsequent screen allow you to choose between them
The mirrors will vary in speed, find one that performs well according to your own testing and hit [ Next > ]
Cygwin will download a list of packages from your chosen mirror:
Type "open" in the search dialogue at the top, expand the "Net" section and click the "skip" text next to OpenSSH, this will come up with a version number. The most recent visible is fine. Ensure the tick box under the "B" (cut off in the screenshot, this is the "Bin?" field, and means you'll be downloading the executable, not the source code). With the version and Bin set for OpenSSH.
If you're familiar with Linux, you may also like to do the same for "Bash" The Bourne Again SHell, or whichever your preference is under the "Shell" category.
When you've chosen your packages click [ Next > ]
You'll be presented by a "resolving dependencies" page, ensure the "Select required packages (RECOMMENDED) " field is ticked:
and [ Next > ]
Your chosen (and some required) packages will be downloaded and installed.
Hit [ Finish ] and use your cygwin icon to load up.
Change directory to your log directory with the "cd" command. Your disk can be referenced from within cygwin using /cygdrive/<driveletter>/path/to/your/logs.
And use the scp command to upload those files, referencing your key file and username as documented on the hosted reporting page.
This functionality can be scheduled using the DOS Batch file attached to this article using windows Task Scheduler, you will need to edit the four variables at the top, and ensure you're moving to the cygwin disk (defaults to C:).