自动scp
[root@BMS020 ~]# cat /opt/onlineorder/logs/logtransfer.sh
#!/bin/bash
DSTUSER=monitor
DST="192.168.50.234"
DSTPATH="/data/BMS020bk"
scp -i /root/.ssh/to234 /opt/onlineorder/logs/*error*.zip $DSTUSER@$DST:$DSTPATH/error/
#&& rm -f /opt/onlineorder/logs/*error*.zip
scp -i /root/.ssh/to234 /opt/onlineorder/logs/*.gz $DSTUSER@$DST:$DSTPATH/systemout/
#&& rm -f /opt/onlineorder/logs/*.gz