Skip to content

Web SSH#

web-ssh (or webssh-oidc) is a browser-based SSH client. Users do not install anything on their computer: they open a web page, log in at their OpenID Provider, and get a terminal.

Since its rework, web-ssh uses ssh-certificates. It obtains a certificate from the same oinit-ca as the native oinit client, and therefore lands the user in the same account, with the same properties, as every other Motley Cue based mechanism.

This changed

Earlier versions of web-ssh passed the access token through the ssh password field and required pam-ssh-oidc on the ssh server. This is no longer the case. web-ssh is now certificate-based only.

Demo#

You can visit https://ssh-oidc-web.data.kit.edu to login with your web browser.

Login flow#

            SSH Certificates in the Browser: the web-ssh flow
            =================================================
  Browser                 Browser                 CA Server           Motley Cue
  User                    web-ssh (JS)            oinit-ca            motley_cue
  ----------              ----------              ----------          ----------
   |  1. open web-ssh        |                        |                     |
   |     choose an OP        |                        |                     |
   |------------------------>|                        |                     |
   |                         | 2. authorization code  |                     |
   |  3. log in at the OP    |    flow with that OP   |                     |
   |<----------------------->|    -> access token     |                     |
   |                         |                        |                     |
   |                         | 4. generate ephemeral  |                     |
   |                         |    key pair in memory  |                     |
   |                         |                        |                     |
   |                         | 5. send access token   |                     |
   |                         |    + public key        |                     |
   |                         |----------------------->|                     |
   |                         |                        | 6. POST /verify_user|
   |                         |                        |-------------------->|
   |                         |                        | 7. validate token   |
   |                         |                        |    provision user   |
   |                         |                        |    return username  |
   |                         |                        |<--------------------|
   |                         |                        | 8. sign ssh cert    |
   |                         |                        |    with CA key      |
   |                         | 9. return ssh cert     |                     |
   |                         |<-----------------------|                     |
   |                         |                                              |
   |                         | 10. connect to the ssh server with the cert  |
   |                         |--------------------------------------------->|
   |                         |     (sshd trusts the CA pubkey; the          |
   |                         |      force-command runs oinit-switch)        |
   |                         |                                              |
   | 11. terminal in the     |                                              |
   |     browser             |                                              |
   |<------------------------|                                              |

From step 5 onwards this is the ssh-certificate flow – the only difference to oinit is who asks for the certificate.

Why this matters for interoperability#

The login at the OpenID Provider happens in the browser, in an ordinary authorization code flow. Consequently:

  • no oidc-agent account has to be configured on the client,
  • no client software is installed, updated or packaged for the user’s operating system,
  • any OP that the Motley Cue instance is configured to accept can be used.

In practice this makes web-ssh the mechanism with the widest OP coverage: whatever an OP supports in a web browser is sufficient, including multi-factor authentication.

Security properties#

  • The key pair is generated per session in the browser and exists only in the memory of the browser tab. It is never written to disk and never sent to the server.
  • The certificate is short lived (see cert-validity in oinit-ca) and valid only for the host it was requested for.
  • The UNIX username is resolved by Motley Cue and enforced by the CA via CriticalOptions: force-command oinit-switch <username>. Users cannot pick the account they land in.
  • Because the key material lives in a web page, the exposure is that of the browser context rather than that of a local process. Serve web-ssh over HTTPS from a host you control.

Server side requirements#

The same as for oinit, and nothing more:

In particular no PAM module is needed, and password authentication does not have to be enabled in sshd.

Installation#

See our gitlab project for installation instruction.

We also have a docker compose project that demonstrates the useage of the whole system.

Last change: Nov 18, 2026 12:15:57