[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: scp and scripts?



On Wed, Jul 06, 2005 at 03:44:13PM -0400, linux starved wrote:
> I am trying to use scp to copy a host file from one firewall to the
> other using an ftp server.  Problem is, it requires a username and
> password for authentication purposes.  It would be nice if I could get
> it to run once a day.  I searched google and came up empty.  I have
> done almost no scripting whatsoever and need all any and all
> information.  The following is basically what I want the script to do,
> but I heard scp will not work with authentication.  I also read about
> rsync and tried to get the following one liner to work on the source
> server
> 
> scp ramblings:
> cd /usr/local/bin/makeconf
> cp hosts hosts_old
> sftp fwall@server
> username:
> password:
> map to location
> get hosts
> logout of server
> run /etc/cron.daily/inet_access
> 
> 
> rsync one liner
> rsync * -aHpv root@target ip:/location where it is to be copied
> somehow it needs to copy over old host file
> now it needs to run /etc/cron.daily/inet_access
> 
> 
> Thanks again in advance, I am determined to learn to script, and
> appreciate any and all help.
> 

You need to setup a public key for that to work.

-Roberto

-- 
Roberto C. Sanchez
http://familiasanchez.net/~sanchezr

Attachment: pgpDEBJQU_BWI.pgp
Description: PGP signature


Reply to: