LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   a good cron/scp tutorial (https://www.linuxquestions.org/questions/linux-security-4/a-good-cron-scp-tutorial-81915/)

eduac 08-14-2003 08:35 AM

a good cron/scp tutorial
 
Anyone have a good scp into crontab tutorial?

david_ross 08-14-2003 12:24 PM

What do you mean by this?
How to use scp in a cron job to transfer files?
If you have a lot of files then try rsync over ssh with passwordless logins.

eduac 08-14-2003 12:32 PM

i mean use the scp [source] [login@ip:/path] into the crontab...



rsync ? under in ssh? how can i do this dude?

david_ross 08-14-2003 12:40 PM

1st you need to set up passwordless logins:
1) login as USER on the client (where you want to connect from)
2) ssh-keygen -t dsa
(don't suppy a passphrase now - you can do that later once the first bit works)
3) scp /home/USER/.ssh/id_dsa.pub REMOTEHOST:/home/USER/.ssh/authorized_keys2
(you will need to enter your password this one time)
4) ssh REMOTEHOST

Then create a crontab entry that runs the command:
Code:

rsync -e ssh -arz --delete /local/path/ user@other.server:/remote/path/

eduac 08-29-2003 10:19 AM

sorry dude, but this guide dont working on


All times are GMT -5. The time now is 11:56 PM.