epcim
10/23/2015 - 8:50 AM

ssh-remotecmd.howto.md

Example stdout to ssh pipe:

ssh root@10.10.236.93 ' nice -n15 tar -czvpf - "/etc"  --exclude "*/tmp/*" --exclude "*.log" | ssh -2 -i /home/pm/.ssh/id_dsa pm@10.10.92.172 "( cat > /home/pm/test_bkp.tgz )" '

ssh -2 -i /home/orgbkp/.ssh/id_dsa-console-orgbkp orgbkp@mgmt-web1    'sudo /bin/nice -n15 /bin/tar -czvpf - "/root"  --exclude "*/tmp/*" --exclude "*.log" --exclude "*.out" |  ssh -2 -i /home/orgbkp/.ssh/id_dsa orgbkp@mgmt-console "( cat > ~/REMOTE_BKPS/web1_backup-`date "+%Y-%m-%d-%H%M%S"`.tgz)" '