The same way we deal with speed-of-light delay on earth: CDNs, asynchronous protocols like email, or just ignoring it when we can get away with it (e.g. "instant" messaging). SSH might be a bit tricky, but just pretend your system on mars is a production server and send it a tested bash file (using any of your favorite automation tools).