Click to See Complete Forum and Search --> : a good tutorial of cron/scp


eduac
07-22-2003, 10:45 PM
guys,

Exists some form to automatize the scp command?

for example:
i need to copy with one minute of interval the .php files from a local folder for the server, using scp.

goldbug
07-23-2003, 10:02 AM
I'm assuming you can write a small shell script that does the copy job for you, then just cron the shell script.

Dunno tho, never tried. (Might try it with sftp if scp is a no-go)

goldbug
07-23-2003, 10:44 AM
Alright, did a little digging, and some testing, and found this:

http://www.arches.uga.edu/~pkeck/ssh/

Summary

Use ssh-keygen to generate public & private keys
copy key to remote host (via scp)
start up ssh-agent
use ssh-add to add those keyfiles to the agent
scp/ssh/sftp freely.


This is roughly what I did on my machine(s)

It seems to work just fine from the command line (scp works without password prompt), so it should be good for a CRON job.

eduac
08-14-2003, 10:38 AM
Anyone have a good scp into crontab tutorial?

frymaster
08-14-2003, 08:22 PM
are you saying you want to have a cron job that periodically uses scp to transfer something from one machine to another?

eduac
08-15-2003, 08:19 AM
yeap....

goldbug
08-15-2003, 10:43 AM
Haven't you already asked this question before? What was wrong with my previous answer... or do you need someone to hold your hand?

[admin edit]
i merged these threads since they are the same
[/admin edit]

stolzyboy
08-15-2003, 11:24 AM
Threads have been merged!!!

Don't post the same questions twice!!!

stolzyboy
08-15-2003, 12:18 PM
What part are you having problems with, the scp via shell script, the cron, etc...