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.

    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)

      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.

        22 days later

        Anyone have a good scp into crontab tutorial?

          are you saying you want to have a cron job that periodically uses scp to transfer something from one machine to another?

            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]

              Threads have been merged!!!

              Don't post the same questions twice!!!

                What part are you having problems with, the scp via shell script, the cron, etc...

                  Write a Reply...