Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

Essential Apps

  • Blink: Install Blink on your iPad
  • Tailscale: Install Tailscale on all your devices.
  • mosh: Install mosh on all your devices. It comes with Blink by default.

Nice to have apps

Amphetamine for Mac I use Amphetamine to prevent my Macbook from sleeping when Tailscale is open and the Mac is connected to Wifi and plugged in via a charger. I've read online that it can have side effects like increased heating and lower the battery life span. If you're worried then I suggest just developing through a remote workstation

Setting up Blink

First generate a SSH keypair from the settings, so that the iPad can ssh/mosh to the remote workstation. Then also add the public IP address for the remote workstation and/or the Mac's Tailscale IP address to the host aliases (also via settings). Whenever we're done setting everything up, then moshing to either devices should be as simple as running:

mosh root@workstation -- tmux
mosh user@laptop -- tmux

Developing via a Remote Station

Setting up a Remote Workstation

First I set up a remote station. I used Terraform & a long shell script to set up a workstation on DigitalOcean. You can check out fatih/dotfiles or shanab/dotfiles (mine is a fork of Fatih's, but with minor modifications). In order to be able to ssh or mosh into the workstation, I also added my Mac's and iPad's public keys to ~/.ssh/known_hosts

Developing via a Mac

First install Tailscale and mosh on the Mac. Then allow remote login by going to Settings > Sharing > Remote Login. Since I have firewall enabled and I didn't want to disable it, I had to add the following lines command to my zshrc so that mosh can run normally:

# Allow mosh incoming connections
fw='/usr/libexec/ApplicationFirewall/socketfilterfw'
mosh_sym='/usr/local/bin/mosh-server'
mosh_abs='/usr/local/Cellar/mosh/1.3.2_10/bin/mosh-server'
"$fw" --add "$mosh_sym" > /dev/null
"$fw" --add "$mosh_abs" > /dev/null
"$fw" --unblockapp "$mosh_sym" > /dev/null
"$fw" --unblockapp "$mosh_abs" > /dev/null

Accessing servers via the iPad's browser

One of the main reasons to using Tailscale is that it allows the iPad to connect to server running on either the workstation or my personal Mac, via their corresponding Tailscale-assigned IP address. One can simply copy a device's IP address and paste it in the browser along with the port the server is running on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.