Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 05 Jan 2002 22:04:04 -0500
From:      Gerard Samuel <trini0@optonline.net>
To:        freeBSD Questions <questions@FreeBSD.ORG>
Subject:   Cron//scp cron job  (Re: scp  job)
Message-ID:  <3C37BEA4.4010801@optonline.net>
References:  <20020105161404.F49802-100000@stereophonic.noops.org> <3C37AB6C.2070605@optonline.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Ok, this one is for the archives.
A how to get ssh/cron working together on FBSD.

1. Make a script
-------------
#!/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/bin:/usr/X11R6/bin:$HOME/bin; 

export PATH
zip -r /tmp/file /files/www/data/test
scp /tmp/file.zip user@host:
rm /tmp/file.zip
-------------

2.  Setup ssh for entering password automatically.
-------------
On the server thats sending the file run ssh-keygen, answer any
neccessary questions.
Copy <user>/.ssh/identity.pub to the recieving server.
Move identity.pub on the receiving box to .ssh/authorized_keys.
--------------

3.  Now you should be able to run the script in step 1 and it executes
properly.  Setup cron to execute the script, and youre done...





To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C37BEA4.4010801>