Operating System - HP-UX
1755130 Members
2823 Online
108830 Solutions
New Discussion юеВ

Re: Writing a script for single file transfer to all servers

 
Andrew Cowan
Honored Contributor

Re: Writing a script for single file transfer to all servers

Hi Evans,

If you want to do this in a secure/trusted environment, install OpenSSH on all systems and create a common user with limited rights. Next switch to this user and create a public/private key pair, and distribute the public part to all hosts. Now you can ssh or scp to all of the systems, as this user, but without requiring a password. This gets over all the ".rhosts" type security problems and gives you an encrypted file transfer and remsh.
I use an unpriviledged user to transfer the files, then have a cron job that backs up certain system files before installing the new ones. This not only prevents a hacker from sending anything, but my script provides an audit trail.
Rainer von Bongartz
Honored Contributor

Re: Writing a script for single file transfer to all servers


Why play around with scripts and remsh and permission problems.

You could easily perfom this task and keep synchronized copies of files on all your servers use the rdist command

See: man rdist

Regards
Rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
Daimian Woznick
Trusted Contributor

Re: Writing a script for single file transfer to all servers