[Mimedefang] Perl Question

Russ GilmanHunt rgilmanhunt at hotp.com
Fri Dec 27 11:01:01 EST 2002

Ya know, ssh might do your trick here-
If you *sigh* allow root to ssh in to remote box, you can do something

ssh -t root at remote echo "dude" >> /root/testfile.txt.
-t tells ssh not to use a dumb tty.
if you follow the ssh command with another command it's executed on the
remote host.

That might give you a handle on a bash method to do it. :)

(We used to do a backup script with ssh- something like:
ssh -t root at remote tar cfvz (insert tar option to make it go to stdout)
/var > remote_date.tgz )

Hope this helps!

On Fri, 2002-12-27 at 07:14, Chad Stalvey wrote:
> Sorry this is off topic, but I know this is a good source of information for
> relating topics.
> I'll try and keep this simple.
> I'm trying to write a perl script that will add new lines to a text file
> (named.conf). The problem is that the text file is only writeable by
> root, -rw-r--r-- 1 root other named.conf, and I need to be able to run it
> remotely, say across a secure web port. Can this be done? I was reading that
> in C, you can write a wrapper to do this, and that you can't do it with
> scripts, but perl was an exception.
> Any Ideas? Is this a bad idea?
> Thanks,
> Chad Stalvey
> _______________________________________________
> MIMEDefang mailing list
> MIMEDefang at lists.roaringpenguin.com
> http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
If Bill Gates had a dime for every time a Windows box crashed... ...Oh,
wait a minute, he already does.

More information about the MIMEDefang mailing list