<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: ALLOCX</title>
    <description>The latest articles on DEV Community by ALLOCX (@allocx).</description>
    <link>https://dev.to/allocx</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4090997%2F1697eced-b896-44d8-9d4c-3b7ddc7e9fd8.jpg</url>
      <title>DEV Community: ALLOCX</title>
      <link>https://dev.to/allocx</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/allocx"/>
    <language>en</language>
    <item>
      <title>Your Mac's Terminal in Your Pocket. Orchestrate Your Agents From Anywhere</title>
      <dc:creator>ALLOCX</dc:creator>
      <pubDate>Thu, 03 Sep 2026 17:38:28 +0000</pubDate>
      <link>https://dev.to/allocx/your-macs-terminal-in-your-pocket-orchestrate-your-agents-from-anywhere-1od3</link>
      <guid>https://dev.to/allocx/your-macs-terminal-in-your-pocket-orchestrate-your-agents-from-anywhere-1od3</guid>
      <description>&lt;p&gt;I don't want to be chained to my desk to kick off a run or check on an agent.&lt;/p&gt;

&lt;p&gt;An idea shouldn't have to wait until I'm back home. If it hits me on the subway, I want to open my phone, drop into my Mac, and set it in motion. That's the whole point of this setup: your Mac's full terminal, in your pocket, over LTE. No open ports, nothing exposed to the internet.&lt;/p&gt;

&lt;p&gt;Tailscale + Termius. Tested end to end on a real machine, not from memory. About 20 minutes.&lt;/p&gt;

&lt;p&gt;This is written for a Mac on the computer side, and works the same whether your phone is an iPhone or Android.&lt;/p&gt;

&lt;h2&gt;
  
  
  Before you start
&lt;/h2&gt;

&lt;p&gt;Order matters. You install the key and test the connection &lt;strong&gt;before&lt;/strong&gt; you turn passwords off. Do it the other way around and you'll lock yourself out of your own machine.&lt;/p&gt;

&lt;h2&gt;
  
  
  Part 1. On the Mac
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Install Tailscale.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--cask&lt;/span&gt; tailscale-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It'll ask for your admin password.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Open Tailscale.app and log in.&lt;/strong&gt; Google, GitHub, mail, whatever you use. Write down which one, because the phone has to log in with the same account.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Turn on MagicDNS.&lt;/strong&gt; Go to &lt;code&gt;login.tailscale.com/admin/dns&lt;/code&gt; and enable it. Without this you have to remember an IP. With it, your Mac gets a fixed name.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Turn on SSH.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemsetup &lt;span class="nt"&gt;-setremotelogin&lt;/span&gt; on
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then go to System Settings, General, Sharing, Remote Login, and pick "Only these users" with your account. Don't leave it open to everyone.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Keep it awake while it's plugged in.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;pmset &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="nb"&gt;sleep &lt;/span&gt;0 disksleep 0
&lt;span class="nb"&gt;sudo &lt;/span&gt;pmset &lt;span class="nt"&gt;-a&lt;/span&gt; womp 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A sleeping Mac doesn't answer, no matter how well everything else is configured. On battery it'll sleep anyway, and that's fine. There's no way around it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note your machine's name.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;tailscale status
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You'll see something like &lt;code&gt;your-macbook.tailXXXX.ts.net&lt;/code&gt;. That's the name that goes in Termius. If the command isn't found, use the long path:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;/Applications/Tailscale.app/Contents/MacOS/Tailscale status
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Install tmux.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew &lt;span class="nb"&gt;install &lt;/span&gt;tmux
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is what keeps you from losing the session when your signal drops.&lt;/p&gt;

&lt;h2&gt;
  
  
  Part 2. On your phone (iPhone or Android)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Download Tailscale&lt;/strong&gt; from the App Store (iPhone) or Google Play (Android). Log in with the &lt;strong&gt;same account&lt;/strong&gt; from Part 1. Leave the VPN on. That's what gives you access.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Download Termius&lt;/strong&gt; from the App Store or Google Play. Same app on both.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Generate the key inside the phone.&lt;/strong&gt; Termius, Keychain, &lt;code&gt;+&lt;/code&gt;, Generate key, type Ed25519, name it &lt;code&gt;phone&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Export the PUBLIC key and send it to yourself.&lt;/strong&gt; Open the key you just made, share the public one (it starts with &lt;code&gt;ssh-ed25519&lt;/code&gt;). Email it to yourself, or use AirDrop on iPhone / Nearby Share on Android. The private key never leaves the phone.&lt;/p&gt;

&lt;p&gt;Don't copy an existing key onto the phone. Generate it there, like the step above. Lose the phone, and you delete one line. Done. You never touch your GitHub keys or anything else.&lt;/p&gt;

&lt;h2&gt;
  
  
  Part 3. Connect
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Paste the public key on the Mac.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'ssh-ed25519 AAAA...the-one-you-sent phone'&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; ~/.ssh/authorized_keys
&lt;span class="nb"&gt;chmod &lt;/span&gt;700 ~/.ssh
&lt;span class="nb"&gt;chmod &lt;/span&gt;600 ~/.ssh/authorized_keys
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace the text with the full key you sent yourself. It all goes on a single line. Watch the double &lt;code&gt;&amp;gt;&amp;gt;&lt;/code&gt;. With a single &lt;code&gt;&amp;gt;&lt;/code&gt; you wipe the file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Check it landed right.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh-keygen &lt;span class="nt"&gt;-l&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; ~/.ssh/authorized_keys
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It should list your &lt;code&gt;phone&lt;/code&gt; key. If it throws an error, the paste got cut off.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create the host in Termius.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Address: the name from Part 1&lt;/li&gt;
&lt;li&gt;Username: your Mac user, get it with &lt;code&gt;whoami&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Port: &lt;code&gt;22&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Key: &lt;code&gt;phone&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Connect.&lt;/strong&gt; It should go straight in, no password. If it asks for a password, the key isn't set right. Don't move on until this works.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Set tmux as the startup command.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;tmux new &lt;span class="nt"&gt;-A&lt;/span&gt; &lt;span class="nt"&gt;-s&lt;/span&gt; phone
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This goes in the host's config in Termius, in the startup command field. Now if the LTE cuts out in a tunnel, you reconnect and everything's exactly where you left it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Part 4. Close the door
&lt;/h2&gt;

&lt;p&gt;This part goes &lt;strong&gt;only after&lt;/strong&gt; the connect step above worked.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Turn off password login.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo tee&lt;/span&gt; /etc/ssh/sshd_config.d/200-hardening.conf &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="no"&gt;HARDEN&lt;/span&gt;&lt;span class="sh"&gt;'
PasswordAuthentication no
KbdInteractiveAuthentication no
PermitRootLogin no
PubkeyAuthentication yes
&lt;/span&gt;&lt;span class="no"&gt;HARDEN
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;200&lt;/code&gt; in the name matters: it has to sort after the &lt;code&gt;100-macos.conf&lt;/code&gt; that's already there.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Validate before restarting.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;sshd &lt;span class="nt"&gt;-t&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If it says nothing, you're good. If it throws an error, fix it &lt;strong&gt;before&lt;/strong&gt; going on, otherwise you leave SSH broken.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Restart SSH.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;launchctl kickstart &lt;span class="nt"&gt;-k&lt;/span&gt; system/com.openssh.sshd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Don't close that terminal. Leave it open until you've reconnected from the phone. It's your safety net if something went wrong.&lt;/p&gt;

&lt;h2&gt;
  
  
  Part 5. Confirm it worked
&lt;/h2&gt;

&lt;p&gt;From the phone, already connected:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;hostname&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It should return your Mac's name. You're inside the right machine.&lt;/p&gt;

&lt;p&gt;From the Mac:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;tailscale status
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Find your phone's line. If it says &lt;code&gt;direct&lt;/code&gt;, you're going peer to peer and it's fast. If it says &lt;code&gt;relay&lt;/code&gt;, it still works but with more latency, depends on your carrier's NAT.&lt;/p&gt;

&lt;p&gt;Make sure passwords are really off:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo grep&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; PasswordAuth /etc/ssh/sshd_config.d/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It has to say &lt;code&gt;no&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The real test
&lt;/h2&gt;

&lt;p&gt;Turn off your phone's WiFi and connect over LTE. If you get in, it works for real. If you only tested at home with both things on the same network, you haven't tested anything yet.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two more things
&lt;/h2&gt;

&lt;p&gt;If typing feels laggy, install mosh:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew &lt;span class="nb"&gt;install &lt;/span&gt;mosh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It survives IP changes and echoes your keystrokes locally, so it feels instant even when the connection isn't. Termius supports it on both iPhone and Android. If it fails, set the server path by hand, &lt;code&gt;/opt/homebrew/bin/mosh-server&lt;/code&gt;, because that folder isn't in the PATH an SSH session gets.&lt;/p&gt;

&lt;p&gt;If you can't connect, check in this order: the Mac is awake and plugged in, the Tailscale VPN is on on the phone, and both show up in &lt;code&gt;tailscale status&lt;/code&gt;. It's almost always the first one.&lt;/p&gt;




&lt;p&gt;That's it. Set it up once, and the distance between an idea and a running agent becomes the time it takes to unlock your phone.&lt;/p&gt;

&lt;h2&gt;
  
  
  For agents
&lt;/h2&gt;

&lt;p&gt;If you'd rather hand this off, drop the prompt below into your agent. Fill in your phone OS and it'll fetch this article, adapt the phone steps to your device, and walk you through it. The computer side is Mac only.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Fetch this article and build me a step by step plan to implement it:
https://dev.to/allocx/your-macs-terminal-in-your-pocket-orchestrate-your-agents-from-anywhere-1e64

My setup:
- Computer: macOS [YOUR VERSION, e.g. Sequoia 15]
- Phone: [iPhone (iOS 18) OR Android 15]

The article is for macOS + iPhone/Android. Keep all the Mac commands as
written (Homebrew, SSH hardening, pmset), and use the phone steps that
match my device:
- Download Tailscale and Termius from the App Store (iPhone) or Google
  Play (Android).
- Generate the key inside Termius and share the public key the right way
  for my phone (AirDrop on iPhone, Nearby Share on Android, or email).
- Keep the same safety order: install the key and confirm the connection
  BEFORE disabling password login, so I never lock myself out.

Give me the plan as numbered steps with the exact commands to run, and
tell me how to verify each part worked before moving on.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Set the two lines to your Mac version and your phone before you run it.&lt;/p&gt;

</description>
      <category>tailscale</category>
      <category>ssh</category>
      <category>productivity</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
