Small changes to allow other connections protocol besides scp when syncing a file.