Tuesday, January 26, 2010

One Man's Download Is Another Man's Upload

In my work environment, I often have to transfer files between UNIX servers and my Windows machine. For security and many "other reasons", I have to remote desktop to another Windows server (so call "gateway server") before I can access (ssh, sftp) to those UNIX machines. If not, I will have to answer all the "why". Although there is no firewall setup between all these layers, I often have to make use of the gateway server to be the middle man to do all the file transfer.

I blogged about how to download files from UNIX server, but never mentioned about how to upload file to the UNIX server. At the back of my mind I have been thinking about writing an http service for uploading. After some thoughts, I think I can simply run the same script in my Windows (Python under Cygwin) and use wget to download files to the UNIX server.

With this approach, I do not have to launch browser to upload files and all these can be done via command line. Also, I can reuse my old code.

Labels: ,

0 Comments:

Post a Comment

<< Home