Connect to Plan 9 from a mobile device

Help, my phone is my only Internet access

This article describes how a mobile phone (in this case, an iPhone) may be used to quickly and easily access a Plan 9 computer. Note: The path to victory is littered with compromises of necessity that terminate in reasonable functionality. Your mileage may vary.

SSH client

Any SSH client will do.

For iOS, there exists an app called Prompt 2 by Panic, Inc., whose features are sufficient to the task. Prompt 2 may be configured for one-click connection to a remote server, including the ability to automatically run a command once the connection is established (see below).

Remote UNIX SSH server

The following platforms are recommended: OpenBSD, FreeBSD, Solaris, MacOS. Other UNIX-like systems may also be able to compile and run drawterm (see below).

Terminal multiplexer

A terminal multiplexer such as tmux(1) may be used to sustain a drawterm connection across numerous SSH sessions. For convenience, create a script to re-attach your session that may be executed by the SSH client:

#!/bin/sh
tmux -u attach

drawterm -G

The 9front project has forked and updated Russ Cox’s original drawterm:

http://drawterm.9front.org

adding (among other things) support for a non-graphical, text-based command line mode:

drawterm -G -h $host -a $auth_server -u $user

The drawterm command is likewise suitable for being run from a script.

Go!

All the pieces in place, configure your SSH client to connect to the remote UNIX SSH server and re-attach to your tmux(1) session.

Prompt 2 running on an iPhone 7 Plus

Related: 9front, Plan 9