SSH on the iPhone at last

Firstly, rather than make this a review of the ssh clients available out there, I’ve decided to stick with the client I bought: iSSH. Reasons for buying this one over the others? It does well in comparisons/reviews and it’s available in the UK. Go read the reviews linked as they do what I’d have done better than I would have done it.

Note: If you don’t want to read a boring article full of opinions and screenshots, The following string is what you came for, whether or not you know it. "screen -DRRS iphone"

iSSH restarting MySQL
Look! Restarting MySQL from a fricking phone!

For me, there isn’t a perfect SSH application, but iSSH is closest. I’d like a lot more than what’s on offer, like a way of storing passwords and ssh keys. Yes, it’s insecure to have these on an item you can lose, but this is what PINs and the like are for. Imagine staring up your ssh client, selecting your connection, typing in your 4-digit PIN and seeing your connection spring to life. Then, the connection gets disconnected as your bus goes in a tunnel or something, you reconnect automatically and pick up where you left off as soon as you’re reconnected to t’internets. Forgetting your PIN would result in your passwords and keys being flushed from the device, but nothing more than that. None of them does this, but I think it’s the cleanest way.

So, how can we at least deal with a few of the issues ourselves? There’s a simple way and that’s a well-known tool called screen. This gives us our connection that doesn’t lose its place if it gets disconnected and it gives us multiple sessions, after a fashion.

Here’s how I set up my iPhone’s iSSH to launch screen and reattach to my iPhone specific connection:

iSSH

What that does is launches screen immediately with our iPhone session connected; -S iphone ensures it picks up the correct session and the -DRR does whatever is necessary to create, detatch, reattach, whatever, to get your session back. The line in the manpage is one of the finest I’ve come across:

-D -RR
Attach here and now. Whatever that means, just do it.

Using screen also potentially gives you access to a copy/paste buffer, but the downside of using screen is that you can’t scroll using iSSH’s scrolling gestures, so these are not anywhere as near useful as you’d hope. Version 1.2 claims integration with GNU Screen, so we’ll have to see if that removes some of the problems inherent with using Screen.

Speaking of future versions, apparently, version 1.1 of iSSH is currently held up in Apple’s application testing department, but it claims to do SSH keys and the like, which will take it one step closer to the ideal client. [1]

iSSH has its own forum on google groups.

Update: Dean Beeler, the application’s developer, posted this excellent hint for screen on the aforementioned forum :

An additional tip that gets scrollback working in
screen is by modify the user’s .screenrc file to contain the following
line:
termcapinfo xterm ti@:te@

Update 2: Version 1.1 is on the App Store. Woohoo!

Jared Earle is a writer, photographer and systems administrator. You can find him on Twitter most of the time.