iPad Terminal with Termius and tmux
Below are instructions on how to set up a pleasant terminal experience on the iPad using a remote ssh server such as your home mac computer.
Connecting with Termius ssh client for iPad
Termius is a great looking a full featured freemium cross platform ssh client.
The steps below can all be done with the free version of the app; none of this requires the paid features.
Create and set up an SSH Key
On your ssh server:
ssh-keygen -t ed25519
The output will be your private and public key.
id_ed25519 id_ed25519.pub
Air drop the private key to your iPad and append the contents of the .pub public key into ~/.ssh/authorized_keys
Secure your SSH by disabling password authentication
sudo -E vi /etc/ssh/sshd_config
And make sure the following values are set
Optional: Upgrade your SSH key to iOS Secure Enclave
To go a step further with security, you can remove the risk of mishandling the private key from the previous steps by generating a completely new private key that not even the Termius app has access to and requires FaceID for use.
Use tmux to keep your session alive between disconnects
I’ll leave it to you to set up your own perfect tmux configuration, but here’s a few key snippets that made it seamless for me.
In my shell config, I created a helpful one character function that will dynamically create a new tmux session or start a new one of non exist:
Other Tips
Make vim background transparent to better match the Termius client.
To do so, just add this in your vim config, below setting your colorscheme: