wolfhesse
3/8/2013 - 3:33 PM

rsync with non-standard ssh-port (22) commandline

rsync with non-standard ssh-port (22) commandline

# r20130829 reform, make-callable
# rsync --rsh="ssh -p {ssh-port}" {local-path} {user}@{ip-add}:{path}/
PORT=$1
LOCAL_PATH=$2
USER=$3
IP_ADDRESS=$4
REMOTE_PATH=$5
rsync -rsh="ssh -p $PORT" $LOCAL_PATH $USER@$IP_ADDRESS:$REMOTE_PATH