• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 577
  • Last Modified:

Automated file copy from Linux server to Windows box

I have a FC5 Linux machine that runs a shell script daily to pull backup files from a remote Linux web server. This is all the machine does. It is rather old and the file system is starting to randomly crash so the daily transfer fails due to the root volume dropping into read-only protected mode. Since I have to manually move the files periodically to a windows server anyway I need to run a scheduled script on the WIndows machine to pull the files from the web server directly. A cron job on the web server creates the daily backup files and stages them in a directory for transfer. The local Linux box that is failing runs the following shell script that lives in /etc/cron.daily and uses an rsa key for login vaidation, which I don't know much about:

scp -i /home/localuser/my-auth/id_rsa -pr user_id@mydomain_name.org:mylinuxbox/* /staging/data_backup/.
chown root:root /staging/data_backup/*

Can I run Winscp in command line or in some other way to do the same thing to bring the files directly to the Windows box?
  • 2
2 Solutions
Yes, but you'll want to get "PSCP" from the putty software:


the syntax on PSCP is same as SCP

NozmokingAuthor Commented:
Thanks - since the Linux box uses rsa keys for login credentials on the remote server, can I copy them to the Windows machine and reference the same keys in the script? I haven't dealt with this type of unattended authentication before.

You need to generate the keys on the windows system and copy the  public keys to each machine.

Please see the links below:

NozmokingAuthor Commented:
Got it - that's what I was looking for.

Thanks very much!

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now