Skip to content

How to SSH into Mac from iPhone using Tailscale

Published: at 03:00 PMSuggest Changes

How to SSH into Mac from iPhone using Tailscale

Motivation

I saw some posts about how to SSH into Mac from iPhone to leverage the LLM’s CLI capabilities. I wanted to try it out, so I set it up using Tailscale.

Steps

  1. Install Tailscale on your Mac and Set up Tailscale and log in.
  2. Install/Login Tailscale on your iPhone
  3. Install Termius on your iPhone and connect to your Mac via SSH.

Install Tailscale on Mac

The tailscale provides three ways to install Tailscale on Mac: Standalone variant, App Store variant, and Open Source variant. In short, you need to install Open Source variant to ssh into your Mac. I need to look into it to understand the reason, but the Mac has a restriction to run the deamon process from the desktop app, so you need to run the Open Source variant to run the deamon process.

Note: as described in the tailscale documentation, you could not use the GUI app. So you should be comfortable with the command line interface.

You can install the application as described in the Tailscaled on macOS.

go install tailscale.com/cmd/tailscale{,d}@main

After installing, you can run the following command to install the system daemon:

sudo $HOME/go/bin/tailscaled install-system-daemon
tailscale up
tailscale status
tailscale set --ssh

Install Tailscale on iPhone

Install the Tailscale app from the App Store on your iPhone and log in with the same account you used on your Mac. You can see two devices connected to the same Tailscale network, which is called tailnet.

Install Tailscale on iOS

Install Termius on your iPhone and connect to your Mac via SSH.

As a SSH client, I used Termius. You can install it from the App Store on your iPhone.

In Termius, you can add a new host by tapping the ”+” button in Vault tab. Enter the following information:


Next Post
How to Install Ubuntu on GMKTech Mini PC