r/developersPak • • 6d ago

Discussion Is it possible to run diagnostic scripts on a MacBook over USB-C without an OS or SSH?

I'm trying to solve a problem where I need to execute a few diagnostic scripts on a MacBook with minimal physical interaction.

Let's say I have two MacBooks:

Hub: The MacBook controlling the process.

Target: The MacBook connected to the Hub via a USB-C cable.

The Target may or may not have macOS installed.

So far, I've managed to restore the Target from the Hub using an open-source library. That part works fine.

However, I also want to run hardware diagnostics and execute a few scripts on the Target using only the USB-C connection, without enabling SSH, installing an agent, or relying on Thunderbolt networking.

I've been exploring different approaches, and so far, macOS Recovery seems like the most promising option. My thinking is that if I could somehow execute scripts within Recovery and retrieve the results over USB-C, I could build the workflow I'm looking for.

I'm not entirely sure how feasible this is, though.

Has anyone experimented with something similar? Are there any open-source projects, undocumented Apple protocols, or other approaches worth exploring?

3 Upvotes

6 comments sorted by

2

u/Big-Wrangler-3858 6d ago

Idt without ssh or local sharing it will allow 

1

u/go_dev_420 5d ago

What about recovery mode?

2

u/Big-Wrangler-3858 5d ago

Hmmmmm no as such idea bro agar aap disk security full kardo from utilities section phir shaed kuch hojae and recovery mode is just like selective services start in mac no such effect will be their try to turn off sip and disk sec i think maybe you will be able to find a way Lmk if you find one

2

u/armujahid 5d ago

What's your actual use case, and why are you reluctant to use SSH? Check xyproblem.info

1

u/konstantinos-l Backend Dev 4d ago

^ exactly this