nassh: improve gnubby extension probing

Users are reporting SFTP mounting sometimes not working.  Suspect the
reason is because, on their CrOS systems, they only have the gnubby
app installed, and we end up defaulting to the extension.

The probe code has a timeout of 1 second, and when you first log in
to CrOS, there's a bit of a "thundering herd" problem in that a lot
of things are running and overall it's slow.  That causes us to stop
waiting for any results and go with the default (the extension).
This is all done in the context of the background page which may be
further deprioritized.

Making normal SSH connections works because it sets up a new runtime
everytime the window is loaded which does a new probe and doesn't run
into the timeout.  When making a SFTP mount, the background page does
everything, so the first probe at login has stuck (i.e. the one that
hit the timeout and defaulted to the extension id).

We address this in two ways: first we tweak the default so we use the
stable app id on CrOS and the stable extension id everywhere else.
This should make things "just work" for the majority of users.  Second,
we remove the overall timeout from the probes because it isn't actually
necessary: the probing is done asynchronously via Promises, so we don't
block any execution, and if nothing is installed, we simply don't pass
back any values.

We also add the dev variants of the extension in case the user has those
enabled instead of the stable one.


Change-Id: Id4d4aec20befc0a0f844b1f7a82c4de55718958c
Reviewed-by: Vitaliy Shipitsyn <>
Tested-by: Mike Frysinger <>
1 file changed
tree: e248b1d2832651419afaa6890c45b7956e550c58
  1. .clang-format
  2. .eslintrc.js
  3. .gitignore
  7. hterm/
  8. libdot/
  9. nassh/
  11. package.json
  12. saltpig/
  13. ssh_client/
  14. wam/
  15. wash/


This repository contains the libdot JavaScript library and some web applications that make use of it.

The official copy of this repository is hosted at

There is also a mirror on github at A few subprojects are also extracted out into their own git repo and mirrored. Keep in mind that these mirrors may occasionally be behind the official repository.

All changes must go through the Gerrit code review server on Github pull requests cannot be accepted. Please see the document in this directory for the details.

Top level directories

  • libdot/ is a small set of JS libraries initially developed as part of hterm, now available as shared code.

  • hterm/ is a JS library that provides a terminal emulator. It is reasonably fast, reasonably correct, and reasonably portable across browsers.

  • nassh/ is the Secure Shell Chrome App (currently a “v1.5” app, soon to become a “v2” or platform app) that combines hterm with a NaCl build of OpenSSH to provide a PuTTY-like app for Chrome users.

  • ssh_client/ is the NaCl port of OpenSSH. It is used by nassh to create the Secure Shell App.

  • wash/ is a library for cross-origin virtual filesystems, similar to the Plan 9 filesystem. This directory also contains a simple bash-like shell environment for exploring these filesystems. The code in this directory is a work-in-progress.