Distant use of multiple Macs/Mac devices

Hej!


I am a researcher and work with computational models and calculations. Due to to the nature of my work and the projects I am in, I move around a lot and take my MacBook Pro with me, but while I am travelling it is not always on.

I had an idea, and am asking if this is possible, how to do it and if anyone has done it/tried yet. If I get a home Mac (e.g., Mac mini or Mac Studio), can I connect with it at a distance from my MacBook, code scripts for it to run (since some models take days to compute all of the cases) and then access the results from my MacBook wherever I am (this last one I believe is an easy fix via OneDrive or Apple Cloud or other tools). So my inquiry is mainly regarding the first two steps, remotely controlling and dispatching my home Mac.

(I imagine that all of this is done easily via Linux, but I love the Apple ecosystem for my work and I want to be able to do this in a secure way)


Thank you in advance for all of the (constructive) answers.


Best

MacBook Pro 13″, macOS 13.3

Posted on Aug 22, 2023 6:34 AM

Reply
Question marked as Top-ranking reply

Posted on Aug 22, 2023 8:21 AM

You’re basically asking about running a server. You can do that locally and on your own hardware as you’re considering, or you can host that on your organization’s servers, or host it on services such as Amazon EC2 Mac, or MacStadium.


Running stuff locally and uploading results files to iCloud Files is trivial.


The biggest hassle with running stuff locally is remote access, maintenance, and security; of opening the necessary ports for submitting requests remotely, of potentially setting up Dynamic DNS or maybe static IP from your ISP, and of keeping the server secure including maybe (probably, preferably) setting up a DMZ to better network-isolate the “exposed” Mac in the event of a breach, among other details. The riffraff like finding and poking at open ports and servers, and will scan for and poke incessantly. Basically, you’re becoming your own server IT, and your own network security team, and your own breach mitigation and recovery team if and as needed.


If you want this to run like batch, you can entirely avoid opening ports and the associated issues and hassles, set up a few areas in iCloud Files where you can leave scripts, and can run a script periodically in the server that scans those areas, renames the script job files from the submission directory into a working directory, invokes the scripts, and then uploads the results and the scripts job files into a different directory when completed. A hack version of this is a few simple shell scripts and a launchd file or two (Lingon app is handy for using launchd) to check for and run the scripts periodically; say every five minutes or so. To “submit” a job, load a script into the iCloud submission directory, wait for it to move to the working directory (which means the server has captured it) and Bob’s your uncle. Ugly, not entirely stable around things like power outages and restarts, but workable. And all comms and all files and all networking are secured via Apple ID and iCloud.


Apple used to have something similar to this distributed processing with Xgrid, but that was deprecated an aeon or two ago. This whole grid or cluster computing area has largely died out.


There are vendors still selling distributed job schedulers, and that link is to an intro and that intro is provided by one of the entities offering a scheduler. That’s probably more than you want to pay.


Hosting on macOS at Amazon or MacStadium means you connect into the server there and set up and run your jobs there. It’s like the local option, but with somewhat less IT and networking and security, as you don’t need to establish and maintain access into the server.

2 replies
Question marked as Top-ranking reply

Aug 22, 2023 8:21 AM in response to Luka77S85

You’re basically asking about running a server. You can do that locally and on your own hardware as you’re considering, or you can host that on your organization’s servers, or host it on services such as Amazon EC2 Mac, or MacStadium.


Running stuff locally and uploading results files to iCloud Files is trivial.


The biggest hassle with running stuff locally is remote access, maintenance, and security; of opening the necessary ports for submitting requests remotely, of potentially setting up Dynamic DNS or maybe static IP from your ISP, and of keeping the server secure including maybe (probably, preferably) setting up a DMZ to better network-isolate the “exposed” Mac in the event of a breach, among other details. The riffraff like finding and poking at open ports and servers, and will scan for and poke incessantly. Basically, you’re becoming your own server IT, and your own network security team, and your own breach mitigation and recovery team if and as needed.


If you want this to run like batch, you can entirely avoid opening ports and the associated issues and hassles, set up a few areas in iCloud Files where you can leave scripts, and can run a script periodically in the server that scans those areas, renames the script job files from the submission directory into a working directory, invokes the scripts, and then uploads the results and the scripts job files into a different directory when completed. A hack version of this is a few simple shell scripts and a launchd file or two (Lingon app is handy for using launchd) to check for and run the scripts periodically; say every five minutes or so. To “submit” a job, load a script into the iCloud submission directory, wait for it to move to the working directory (which means the server has captured it) and Bob’s your uncle. Ugly, not entirely stable around things like power outages and restarts, but workable. And all comms and all files and all networking are secured via Apple ID and iCloud.


Apple used to have something similar to this distributed processing with Xgrid, but that was deprecated an aeon or two ago. This whole grid or cluster computing area has largely died out.


There are vendors still selling distributed job schedulers, and that link is to an intro and that intro is provided by one of the entities offering a scheduler. That’s probably more than you want to pay.


Hosting on macOS at Amazon or MacStadium means you connect into the server there and set up and run your jobs there. It’s like the local option, but with somewhat less IT and networking and security, as you don’t need to establish and maintain access into the server.

Aug 22, 2023 6:46 AM in response to Luka77S85

Sure. You will have to configure some kind of sharing on the computer - remote login, file sharing, and/or screen sharing. I find screen sharing the most convenient because you can keep the same terminal up and available.


The first difficulty is that you will have to properly configure your home router to allow connections. It is your router that listens for these connections. It will have to route them to your Mac. Most routers have this capability.


You will want to make sure to have a very strong password. When your home computer is sitting on the internet like this, it will be under constant attack from hackers - and I mean constant. So you better make sure that your router has a strong password and isn't otherwise vulnerable. Also make sure that you don't have any other home devices connected that either have weak passwords or are otherwise vulnerable. When you are hosting a server, any vulnerability will be exploited and published, including those vulnerabilities that you don't even know about. Plus, hosting a server may even be against your ISP terms of service. Might want to check that too.


And it gets worse from there. You even have to reduce your security just to do this. You can't use FileVault. If you need to restart or lose power, then you can't log in again until you are physically there.


You might want to consider a hosting service instead of using your home internet. It will be much faster as home internets are often very slow. And the constant hacking activity can slow down your router and connection too. Did I mention how you will be under constant, non-stop hacking attempts?


I'm afraid that really the best solution is one of those new 15" MacBook Airs. They are light as a feather and crazy fast.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Distant use of multiple Macs/Mac devices

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.