titan-ssh

Documentación

Claves en hardware

Una clave SSH que se crea dentro del chip de seguridad del dispositivo y no sale nunca de él: ni la app ni nadie con acceso a tus ficheros puede copiarla. Solo firma, allí dentro, cada vez que te conectas.

Qué es

Con una clave normal, la clave privada es un fichero (o un secreto en el almacén del sistema) que la app lee para firmar. Con una clave en hardware, la privada la genera el chip de seguridad del dispositivo, se queda dentro y no se puede exportar: la app solo le pide que firme. El servidor solo ve su clave pública, como con cualquier otra clave.

Para empezar

  1. En el editor del host, en Autenticación, elige «Clave (hardware)».
  2. Ponle un alias (un nombre para la clave, p. ej. casa). Varios hosts pueden usar el mismo alias, y entonces comparten la clave.
  3. Marca «Instalar la clave en el host por mí» y escribe la contraseña del servidor una vez: la app genera la clave, copia su línea pública en authorized_keys y comprueba que entra. También puedes pulsar «Generar / mostrar clave» y copiar la línea tú.

Sistemas

DispositivoDónde vive la claveTipo
Android 8 o posteriorAndroid Keystore, en StrongBox si el móvil lo tieneecdsa-sha2-nistp256
Windows 10 y 11El TPM 2.0 del equipo, a través del proveedor de claves de Windows (Microsoft Platform Crypto Provider)ecdsa-sha2-nistp256
LinuxEl TPM 2.0 del equipo, directamente por /dev/tpmrm0. No hace falta instalar nadaecdsa-sha2-nistp256
Llaves de seguridad (YubiKey, FIDO2) y agente SSH del sistemaTodavía no. Están previstas para más adelante.
  • Todos los equipos con Windows 11 tienen TPM 2.0. En Windows 10 y en Linux depende del equipo; casi todos los PC de los últimos años lo traen, a veces desactivado en la UEFI/BIOS.
  • El tipo es siempre ECDSA P-256 porque es el que admiten todos los TPM y todos los Android. Cualquier OpenSSH actual lo acepta.

Requisitos

Windows

  • Un TPM 2.0 activo. Para comprobarlo, abre tpm.msc: debe decir «El TPM está listo para usarse».
  • No hace falta ser administrador. Windows guarda la clave para tu usuario.

Linux: el grupo tss

El TPM aparece como /dev/tpmrm0. En casi todas las distribuciones ese fichero pertenece al grupo tss, así que tu usuario tiene que estar en ese grupo para que la app lo use. Si no lo está, el editor del host lo dice. Se hace una sola vez:

  1. Comprueba el TPM y su grupo: ls -l /dev/tpmrm0 (debe salir algo como crw-rw---- … root tss …).
  2. Añade tu usuario al grupo: sudo usermod -aG tss $USER.
  3. Cierra la sesión y vuelve a entrar (o reinicia) para que el cambio de grupo se aplique. id debe mostrar tss.
  • Si /dev/tpmrm0 no existe, el equipo no tiene TPM 2.0 o está desactivado en la UEFI/BIOS (a veces se llama «PTT» en Intel o «fTPM» en AMD).
  • Si en tu distribución el fichero tiene otro grupo, usa ese en lugar de tss.
  • Estar en el grupo tss deja usar el TPM a cualquier programa de tu usuario, pero tu clave no: el TPM solo la usa con el fichero cifrado que la app guarda en su carpeta de configuración, y esa carpeta solo la puede leer tu usuario.

Límites

  • La clave es de ese dispositivo. No se puede copiar a otro equipo ni hacer copia de seguridad. Si borras el TPM (desde tpm.msc o la UEFI), reinstalas el sistema o cambias de equipo, la clave se pierde: crea otra con el mismo alias e instálala de nuevo en tus hosts. Conviene tener otra forma de entrar en cada servidor.
  • La estable y la canary tienen claves distintas, aunque uses el mismo alias. Un host copiado a la canary necesita instalar también la clave de la canary.
  • Sin PIN ni huella por ahora: la clave firma mientras tu sesión del sistema esté abierta.
  • Linux en Flatpak: todavía no hay paquete Flatpak. Cuando lo haya, necesitará permiso para acceder a /dev/tpmrm0.

Errores

Tu usuario no tiene acceso al TPM
Linux: tu usuario no está en el grupo tss, o todavía no has vuelto a iniciar sesión después de añadirlo. Mira Requisitos.
Este equipo no tiene un TPM 2.0 activo
Linux: no existe /dev/tpmrm0. Activa el TPM en la UEFI/BIOS o usa una clave software.
Windows no encuentra un TPM 2.0 que pueda usar
Windows no puede abrir su proveedor de claves de TPM. Revisa tpm.msc; si el TPM está desactivado o no está listo, actívalo o prepáralo desde ahí o desde la UEFI.
Falla la conexión con «No hardware key for alias…»
En este dispositivo no hay ninguna clave con ese alias, por ejemplo en un host copiado de otro equipo o de la estable a la canary. Genera la clave aquí e instálala en el host.

Documentation

Hardware keys

An SSH key created inside the device's security chip that never leaves it: neither the app nor anyone with access to your files can copy it. It only signs, in there, each time you connect.

What it is

With a regular key, the private key is a file (or a secret in the system store) that the app reads to sign. With a hardware key, the device's security chip generates the private key, keeps it and won't export it: the app only asks it to sign. The server only sees its public key, as with any other key.

Getting started

  1. In the host editor, under Autenticación (authentication), choose "Clave (hardware)".
  2. Give it an alias (a name for the key, e.g. home). Several hosts can use the same alias, and then they share the key.
  3. Tick "Instalar la clave en el host por mí" (install the key on the host for me) and type the server's password once: the app generates the key, copies its public line into authorized_keys and checks it logs in. Or press "Generar / mostrar clave" (generate / show key) and copy the line yourself.

Systems

DeviceWhere the key livesType
Android 8 or laterAndroid Keystore, in StrongBox when the phone has itecdsa-sha2-nistp256
Windows 10 and 11The computer's TPM 2.0, through Windows' key provider (Microsoft Platform Crypto Provider)ecdsa-sha2-nistp256
LinuxThe computer's TPM 2.0, directly through /dev/tpmrm0. Nothing to installecdsa-sha2-nistp256
Security keys (YubiKey, FIDO2) and the system's SSH agentNot yet. Planned for later.
  • Every Windows 11 computer has a TPM 2.0. On Windows 10 and Linux it depends on the computer; almost every PC from recent years has one, sometimes turned off in the UEFI/BIOS.
  • The type is always ECDSA P-256 because every TPM and every Android supports it. Any current OpenSSH accepts it.

Requirements

Windows

  • An active TPM 2.0. To check, open tpm.msc: it should say "The TPM is ready for use".
  • No administrator rights needed. Windows keeps the key for your user.

Linux: the tss group

The TPM shows up as /dev/tpmrm0. On almost every distribution that file belongs to the tss group, so your user has to be in that group for the app to use it. If it isn't, the host editor says so. You do this once:

  1. Check the TPM and its group: ls -l /dev/tpmrm0 (it should print something like crw-rw---- … root tss …).
  2. Add your user to the group: sudo usermod -aG tss $USER.
  3. Log out and back in (or reboot) so the new group applies. id should list tss.
  • If /dev/tpmrm0 doesn't exist, the computer has no TPM 2.0 or it is turned off in the UEFI/BIOS (sometimes called "PTT" on Intel or "fTPM" on AMD).
  • If the file has a different group on your distribution, use that one instead of tss.
  • Being in the tss group lets any program of your user use the TPM, but not your key: the TPM only uses it with the encrypted file the app keeps in its config folder, which only your user can read.

Limits

  • The key belongs to that device. It can't be copied to another computer or backed up. If you clear the TPM (from tpm.msc or the UEFI), reinstall the system or change computers, the key is lost: create another one with the same alias and install it on your hosts again. Keep another way into each server.
  • The stable app and the canary have different keys, even with the same alias. A host copied to the canary needs the canary's key installed too.
  • No PIN or fingerprint for now: the key signs while your system session is open.
  • Linux Flatpak: there is no Flatpak package yet. When there is, it will need permission to reach /dev/tpmrm0.

Errors

The app's messages are in Spanish; here they are with what they mean.

«Tu usuario no tiene acceso al TPM»
Your user can't reach the TPM. Linux: your user isn't in the tss group, or you haven't logged in again since adding it. See Requirements.
«Este equipo no tiene un TPM 2.0 activo»
This computer has no active TPM 2.0. Linux: /dev/tpmrm0 doesn't exist. Turn the TPM on in the UEFI/BIOS or use a software key.
«Windows no encuentra un TPM 2.0 que pueda usar»
Windows can't open its TPM key provider. Check tpm.msc; if the TPM is off or not ready, turn it on or prepare it from there or from the UEFI.
Connecting fails with "No hardware key for alias…"
This device has no key with that alias, for example in a host copied from another computer or from the stable app to the canary. Generate the key here and install it on the host.