How to SSH into an i386 (Rosetta) session (and not arm64)

I need to run commands remotely from a PC; We have been doing so by running SSH and entering these commands.


However, with M1 devices, we are no longer in an i386 environment.


From the OSX desktop, I can configure a terminal to open in Rosetta, and the "arch" command returns 'i386'.


However, I have not been able to figure out how to have an SSH session do this.

Mac mini 2018 or later

Posted on Feb 9, 2022 5:12 PM

Reply
Question marked as Top-ranking reply

Posted on Feb 10, 2022 9:50 AM

Rosetta 2 works on a per-app basis, and does not operate as a hypervisor guest or separate operating system instance.


If you ssh into macOS, you’ll get the native macOS platform and architecture and command line, and you can then run the app as needed.


Unless the app you’re connecting to implements its own ssh server, you’re going to get the system ssh daemon. Which I’d doubt the app does.


Should you run a GUI app requiring Rosetta 2, the activation of Rosetta 2 will be transparent for most purposes; the app will appear and will launch the same as a native app.


For command-line apps, the arch command mentioned above is the means to launch an older app, pending rebuild or replacement of that app with a native app.


6 replies
Question marked as Top-ranking reply

Feb 10, 2022 9:50 AM in response to ultralame

Rosetta 2 works on a per-app basis, and does not operate as a hypervisor guest or separate operating system instance.


If you ssh into macOS, you’ll get the native macOS platform and architecture and command line, and you can then run the app as needed.


Unless the app you’re connecting to implements its own ssh server, you’re going to get the system ssh daemon. Which I’d doubt the app does.


Should you run a GUI app requiring Rosetta 2, the activation of Rosetta 2 will be transparent for most purposes; the app will appear and will launch the same as a native app.


For command-line apps, the arch command mentioned above is the means to launch an older app, pending rebuild or replacement of that app with a native app.


Feb 10, 2022 1:41 AM in response to cmitt68

I am running a propietary executable designed and compiled to run under i386 osx.


When I am local, I have to run a "Rosetta" configured terminal window. When in this session, if I run the "arch" command the response is "i386" not "arm64".


However, when I ssh into the Mac, the response is always "arm64".


I am not a developer, nor am I familiar with OSX. I have been instructed to use a "Rosetta" terminal to run this executable, and thst I need to be in an i386 environment.


But it sounds like as long as rhe executable was compiled under i386, I can run from either command line architecture?


Feb 10, 2022 2:14 PM in response to ultralame

First follow etresoft's advice. Try it. If it works, call it a day. Because everything MrHoffman explained applies, and macOS will automatically run any intel compiled executable via Rosetta. This is baked into the operating system as a very low level.


But just to be sure. Have you tried running it via an ssh session?


Did it run or did it fail?


If it failed, what error messages did you get? Exact copy & paste text of the error messages please.

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.

How to SSH into an i386 (Rosetta) session (and not arm64)

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