SSH on the iPhone and iPod Touch
Wednesday, August 20th, 2008SSH is undoubtedly a useful tool and the iPhone and iPod Touch are great portable ways of connecting to networks; put both together you can be a sysadmin on the move! So what are the options for this? The Apple AppStore currently has two SSH clients, SSH and iSSH, and I took both out for a spin.
SSH
First up is SSH, marketing at $3.99 (£2.39). Opening the program greets you with a screen where you can type in an address to connect to in the form user@hostname:port (the address is added to a list on the first screen so you don’t have to type it next time). Once this has been entered you’re presented with a password entry screen, although you have to press the password entry box to get a keyboard.
If this is successful you get a retro green monospace on black terminal, with a white command line bar at its bottom. This white command line is the only way you can send commands over ssh, you press it to bring up a keyboard with which you type your command and press ‘Send’. This command is then echoed to the terminal and executed. Basic shell commands work well, but once you want to use some basic programs such as less, more or man problems start to show.

Navigation is the main problem with these programs through this client, I’m used to using the arrow and return keys to navigate them (I know there are other ways, but these are the ones I remember). The client has no emulation of arrow keys, so we lose that form of navigation and there is no return key on the keyboard. After looking up some of the other navigation commands available for these programs I was able to navigate them quite successfully, but the process of touch command bar->type command->send for every bit of navigation felt very tedious.
Another basic command I tried and expected to work was top, but alas SSH fails again and produced this output:

which is hardly usable. You can try and scroll the output, using screen swipes, but each time top refreshes your scrolling is lost.
As arrow keys are not implemented command line history is harder, meaning you have to type in commands to access your history, which is annoying and slow if you are using SSH’s input method.
The client allows you to use control commands using the ^ key, so Ctrl-C becomes ^c. This works and is functional, but to reach the ^ key you have to go through two keyboards, which is annoying. Why can’t there be a Ctrl button on the screen ready for me to use whichever keyboard I’m in?
iSSH
Disappointed with SSH I went on to try iSSH (marketing at $4.99 or £2.99). When you start it up for the first time you must add a connection configuration. This is a form where you fill in a name for the configuration, the hostname and at your choice a username and command to execute on connection.

There is no option for which port to connect to, you are stuck with port 22. With a configuration now saved I could choose to connect to it. This dropped me into a terminal where ssh asked me for a password, the bottom half of the screen is filled with a keyboard which types directly into the console. The terminal used is much better than the one SSH used, it has a gray monospace font on a black background, and it supports colours which makes using such a small screen more bearable.
There is a bar above the terminal which contains buttons for the Ctrl, Shift, F# and Tab keys (which can be used in combination), along with Exit. This allows you to use niceties such as tab complete on the command line, a great time saver when using the iPhone’s user input.
Seeing that SSH had been so abysmal when I tried to run top I tried to run top on iSSH, which produced this result:

Hurrah! top is usable using iSSH. Running more, less and man was also successful using iSSH, which gives access to arrow keys through swiping the left 2/3 of the screen, and the keyboard has a return key (the right 1/3 of the screen is reserved for scrolling). This means you can also use the arrow key emulation to scroll the command line history.
Tilting the device the appropriate way will change the display from portrait to landscape. In landscape mode you have the option of hiding the keyboard using a button on the top bar. This is rather useful if you wish to read a file using less; you can invoke less then hide the keyboard giving the whole screen to the file which you can navigate using the emulated arrow keys.

Conclusion
Comparison chart of both clients:

In terms of functionality iSSH beats SSH hands down, there is only one feature the latter has the former does not: port selection. For some users, this will be essential, and they will use SSH and put up with the bad user experience. For everyone else, there is iSSH, which makes ssh usable on the iPhone.
