#!/bin/sh DIR=/export/Jumpstart/config HOST=10.125.30.50 cd $DIR tar cf - . | ssh -lsuntmp1 $HOST "/usr/local/bin/sudo sh -c \"cd $DIR && tar xf -\""