Merge two separate sync functions into single master function for DRY purposes. Ensure ssh is always true.