Skip to content

Device Registration

Before syncing terminals to the cloud, you need to register your device.

Terminal window
kexsh login
Open this URL in your browser: https://app.kex.sh/device
Enter code: ABCD-1234
Waiting for authorization...
Login successful ✓
Device registered: my-macbook

kexsh uses the Device Authorization Grant flow (RFC 8628) — you never type a password in the terminal.

  1. You run kexsh login on your machine
  2. kexsh shows a URL and a short code
  3. You open the URL in any browser and sign in with GitHub
  4. You enter the code to approve the device
  5. kexsh stores a session token locally and registers the device

Your device name defaults to your machine’s hostname. Each device is tracked separately — you can see all your registered devices in the dashboard.

The session token is saved to:

~/.config/kexsh/credentials.json

This file is created with 0600 permissions (owner read/write only). If the same machine logs in again, the existing device record is updated rather than creating a duplicate.

Log out to revoke the session and delete the local token:

Terminal window
kexsh logout

You can also remove devices from the dashboard.