Skip to content

SSH on the iPhone at last

by Jared Earle on August 21st, 2008

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!

From → geek

7 Comments
  1. John Musbach permalink
    Fri, 22 Aug 2008 01:11:16 +0000

    I recommend TouchTerm myself, it has the most features out of all the clients now since 2.0 came out and is well worth the $3.

  2. Likid0 permalink
    Thu, 29 Apr 2010 10:25:05 +0000

    Hi,

    I have been using screen with issh on my ipad for the last couple of days, but what I can’t get working easily is the ctrl+a+c to create a new screen window and ctrl+a+n to jump between them, anyone has got this working ?

    • Jared Earle permalink
      Thu, 29 Apr 2010 10:33:02 +0000

      Works as advertised for me. Hit the Ctrl, the a and the c in sequence (not at the same time) and it works perfectly. Are you trying to hit the buttons at the same time or something? Do you have a .screenrc over-riding those commands?

      If you’re using the Ctrl key on a Bluetooth keyboard, however, this doesn’t work yet. The developer is working on a fix.

Trackbacks & Pingbacks

  1. Jared Earle
    Sat, 30 Jan 2010 22:41:50 +0000
  2. you want to start something? » iPad
    Sat, 24 Apr 2010 23:20:27 +0000
  3. Jared Earle
    Fri, 21 May 2010 17:34:55 +0000
  4. How to Install and Use OpenSSH on iPhone and iPad on Windows (WinSCP) | Mobile-Geeks
    Wed, 07 Jul 2010 19:21:14 +0000

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS