[Omaha.pm] Command SCP client for Windows

Rob Townley rob.townley at gmail.com
Fri Dec 5 01:01:46 PST 2008

On Fri, Dec 5, 2008 at 2:05 AM, Rob Townley <rob.townley at gmail.com> wrote:
> On Thu, Dec 4, 2008 at 8:36 AM, Dan Linder <dan at linder.org> wrote:
>> I'm trying to setup a number of windows systems at work to upload files to a
>> central Linux server using scp and authorized keys to allow for hands-off
>> automation.
>> I started with PuTTY's "pscp.exe", but it has some drawbacks I can't work
>> around:
>>  * The first time it connects, it asks if the ssh fingerprint is OK.  It
>> won't let you use a command line switch to work around this.
>>  * All connection information is stored in the registry.  I'd really like to
>> use something that stores this in simple text files.
>>  * The identification key that comes from the Linux server has to be
>> modified with PuttyGen to convert it to their format.
>> I looked at WinSCP, but it needs the PuttyGen converted keys too.
>>  * Each location will be reporting back to a different server with a
>> different admin, so creating a new key for the client based on their server
>> is going to add a lot of overhead to my end.
>> CygWin crossed my mind, but it's a lot more than I'd like to have my users
>> install.
>> Can anyone point me to a free/gpl/oss command line client for Windows
>> systems that performs just the scp/sftp function using an OpenSSH key format
>> and saves the configuration information in text files?
>> I had hoped that the OpenSSH.org folks would have released a Windows
>> command-line version of their tools, but all their links point me to GUI
>> clients.
>> On a side topic, anyone ever tackled cross-compiling a Win32 text-only
>> program under Linux? :-)
>> Dan
>> --
>> "Quis custodiet ipsos custodes?" (Who can watch the watchmen?) -- from the
>> Satires of Juvenal
>> "I do not fear computers, I fear the lack of them." -- Isaac Asimov (Author)
>> ** *** ***** ******* *********** *************
>> _______________________________________________
>> Omaha-pm mailing list
>> Omaha-pm at pm.org
>> http://mail.pm.org/mailman/listinfo/omaha-pm
> The first thing to get over when cross compiling for LinWin are
> hardcoded text strings need to be identified as either plain ascii or
> unicode.  Win32 development for many years used _T("") instead of ""
> to enclose character strings.  On Win95, _T("") became "" because
> UNICODE wasn't available.  On WinNT, _T("") would become L"" to denote
> 16 bit character UNICODE.   WinNT/WinCE would define UNICODE by
> default making every character 16 bits that wrapped in _T("").
> Further, this means the character pointers would have to be typed out
> depending on the _UNICODE macro.  Since command line programs would
> almost always use parameters, the compile breaks right at main(int
> argc, char *argv[]) because under Win32/UNICODE main was defined to
> only take wide characters.  The solution is simple with a #define
> macro.
> So if main(int argc, wchar_t *argv[] )
> Assuming that it is still things are.....  this is getting too long.
> If you need further help, let me know.
> Robert Townley
> 402-670-4326

Recompiling is more fun, but then i remembered i used to have machines
do this using putty's psftp.exe in a batch file.  There is a cleaner
way, but the best way would be to recompile.

@echo. "echo y | p:\psftp.cmd PASSWORD"
p:\psftp.exe robertjtownley at web.sourceforge.net -pw %1 -bc -b p:\psftp.script
@echo. done

More information about the Omaha-pm mailing list