Top Gun ssh for PalmOS

Top Gun ssh is an ssh (version 1) client for palmtops running PalmOS and having a TCP/IP stack. This includes the Palm Pilot Pro, Palm III, Palm V, the corresponding models of Workpad and Visor, as well as the Treo. It does not include the Palm VII or the i70x; those machines apparently have no way to do TCP/IP.

The current version is 1.3. This version fixes a bug in 1.2 that prevented Top Gun ssh from connecting to newer sshd version 2 servers, even when those servers has a version 1 fallback mode enabled.

The easiest thing to do is just to get the binary package and install all the .prc files contained in it. If you like, you can also grab the source, but be warned that it assumes a really out-of-date Unix cross-compilation toolset.

 *NEW* Some people have reported problems using Top Gun ssh with keyboards, and with Kyocera Smartphones. With keyboards, the problem is that the keyboard driver, when you press a key, inserts the KeyDown event into the event stream, but fails to wake up any program blocked on user input using select(). The result is that your keystrokes only show up when you do some other UI event, such as tapping on the screen. With the Smartphone, the problem is that the phone's implemention of NetLibReceive() has a bug which will cause it to wait the entire length of its timeout argument, even if some data is available right away. Here's a version of TGssh.prc which works around these two bugs. Just install it on your PalmOS device over top of the existing one. Note that it works around the select() problem by polling more often, and so there may be battery-draining issues.

The best way to use Top Gun ssh when logging in to a Unix machine is to install the following termcap entry (use the captoinfo and tic programs to turn this into a terminfo entry if your system uses terminfo):

pi|pilot|tgtelnet:am:xn:bs:co#39:li#16:cl=\Ec:cm=\Em%+ %+ :ho=\Em  :nw=\Em~ :\
        :so=\Eb:se=\EB:bl=^g:cr=^m:do=^j:le=^h:kP=^k:kN=^l:

Once that is installed on the Unix box, just log in with Top Gun ssh, and run screen (which can be found at your local GNU mirror site). That will provide you with a bunch of great features, including multiple virtual terminals, and VT100 compatibility.

If you like Top Gun ssh, donations to the Party Fund are gratefully appreciated. Email me at the address below for details. :-)

This product includes cryptographic software written by Eric Young (eay@cryptsoft.com).


Frequently Asked Questions

  1. How do I enter control characters, or escape?
    You can use ^z (caret,z) to enter control-z, for various values of z. You need to use \^ to enter a real caret, or \\ to enter a real backslash. \e, \b, \n, \r also all do what you expect (escape, backspace, newline, carriage-return, respectively). \cz and \x1a are also control-z, and these generalize in the obvious way.
  2. Can I connect to a non-standard port number (not 22)?
    Yes. Enter the hostname as "hostname:port".
  3. Does TGssh support port forwarding?
    No. Seeing as how PalmOS doesn't support daemon processes running in the background, you couldn't have both TGssh and, say, a mail client running at the same time. What someone could do is rewrite the built-in net.lib to speak port-forwarded ssh natively. But that's a different project altogether.
  4. Is there a way to send an arrow key? If I press the up and down buttons on the Visor it seems to send a page up and page down... Also being able to send left and right buttons would be helpful too.
    Indeed, the up and down buttons send page up/page down. Having run out of buttons (I find it obnoxious to remap the application buttons), you'd have to do arrow keys by sending control or escape codes. But you can set that up however you like. Pick four control or escape codes you would like to use for up, down, left, right. [Control codes you would enter as ^f for control-f. Escape codes you would enter as \ef for escape-f. Control codes are shorter, but most control chars already have a meaning.]

    Let's say you pick \eu, \ed, \el, \er for up, down, left, right.

    Look at the termcap entry you installed:

    pi|pilot|tgtelnet:am:xn:bs:co#39:li#16:cl=\Ec:cm=\Em%+ %+ :ho=\Em :nw=\Em~ :\
    :so=\Eb:se=\EB:bl=^g:cr=^m:do=^j:le=^h:kP=^k:kN=^l:

    Just add to the end (in this case)

    ku=\Eu:kd=\Ed:kl=\El:kr=\Er:

    Not that I've tried it, but it should work. Note that you can map arbitrary control or escape codes to other keys, like function keys, in the same manner. Note that you put a capital E in the termcap entry, but use a lowercase e when you're entering it on the Pilot.

  5. Does TGssh support RSA authentication (as opposed to password)?
    Not at this time. The processor in the Pilot just isn't that speedy, and it would take about 30 seconds for it to complete the calculations needed for login.

Ian Goldberg <tgssh@cypherpunks.ca>