Varcade Dev Blog

SSH-RT – Sent for Certification

by on Mar.26, 2013, under Apps

After 6 months of effort, a SSH client app for Win-RT has been sent to certification for the Windows App Store.  I started this project because I wanted a quality Metro style SSH client for the Surface tablet.  What seemed like a simple project turned out to be a quite a challenge. Building from the bottom up:

Low Level Network

You need the OS to provide network access.  Win-RT has an all new networking API,  so there was not much sample code to look at.  The documentation is good, but still much trial-and-error was needed to work thru asynchronous operations, buffering issues,  handling flaky network connections, etc.

SSH Protocol

There’s a lot more here than just encrypting every packet using a cypher and key.   The cypher and MAC combination must be decided before keys are exchanged. Once the connection is established, there are protocol commands to deal with as well.  I looked at several C# source libraries, but none of them were compatible with the Win-RT available APIs, as they were all tied too closely to the network.  A Java library turned out to be the most help here.   This was about 1/4 of the total development time.

SSH Shell

After the SSH connection is established, you can request a shell.  At this point you are managing virtual window buffers.

Terminal Emulator

This is were things get a little less black and white.  While there are defined standards, most remote apps will use a mixture of different control sets.  By setting the $TERM string, the host may adjust what it uses, but in reality the client needs to be ready to handle anything.  You also manage the scroll buffer here, and an alternate screen that the host may ask you to switch to.  This was about 1/4 of the total development time.

UI

I wanted the App itself to operate like the IE on the tablet, with tabs and ‘bookmarks’, and quick-connect options.  XAML made this the easy part.  Rendering the terminal screen itself was SLOW using the standard XAML controls.   Thousands of characters per second need to be rendered, possibly each in a different color and background,  so Direct X was used.  By not using a standard control, a lot of work was added by doing the ‘simple’ things like scrolling, scaling, touch and mouse controls.  Also multiple resolutions and slide positions have to be handled.

Testing and Bug Fixes

Much testing was done on a combination of systems, terminal modes, and applications.  Supporting all common Linux task was the main priority.  This website was setup and configured using only SSH-RT as part of the testing.


1 Comment for this entry

  • Michael

    Fantastic app so far. The hard work has definitely paid off. More quality metro apps are certainly needed and providing a SSH client like this may lead more developers to join the ranks.

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Blogroll

A few highly recommended websites...