Some thing like this?
Code:
Terry@dixie$ ssh2v 'echo "zone \"test.com\" { 2:45
quote> type slave;
quote> file \"sec/db.test.com\";
quote> masters { 72.26.x.x; };
quote>};
quote>">> /tmp/test.out'
#########################
# WARNING #
#########################
All activity is logged !
Terry@dixie$ ssh2v 'cat /tmp/test.out' 2:45
#########################
# WARNING #
#########################
All activity is logged !
zone "test.com" {
type slave;
file "sec/db.test.com";
masters { 72.26.x.x; };
};
Terry@dixie$ 2:46
note: ssh2v is a personal shell alias that expands to "ssh -p MyPort user@host -i keyfile"
I find it is best to quote all arguments meant to be passed onto ssh to be run as a command on the server (and most similar situations comparable to sh -c 'commands'), helps remind me if I want things like >> redirections to files that I have to pass it to the servers shell, not my clients shell.
I can think of at least one other possible way of doing it, if I"m reading your right but it's just as cheesy I'm sure... (read only network shares) I'd rather hope that there is an appropriate program available to take care of such things as this without having to resort to ssh or nfs/friends.
__________________
My
Journal
Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.