The path every byte takes

From keystroke on your phone to shell on your PC, in order.

Client

Phone

You type into the app on iOS, Android, or the Web App.

Handshake

SPAKE2

Password-authenticated key exchange between your devices.

Result

Session Key

A shared key known only to your computer and the app.

Payload

AES-256-GCM

Every keystroke and byte encrypted before it leaves the device.

Transport

P2P or Relay

DTLS direct link, or WSS through the encrypted relay.

Host

PC

The daemon decrypts and runs the session on your computer.

Layer 1 · Transport

DTLS for direct links, WSS for the relay

Connections are established over DTLS for direct peer-to-peer links, or WSS when traffic falls back to the relay — a secure transport either way. Which one is used depends purely on whether your devices can reach each other directly on the current network; the choice is automatic and invisible to you.

Both transports are outbound connections from your computer, which is why no port forwarding or public IP address is needed. That design is covered in more detail in remote access without port forwarding.

Layer 2 · Handshake

SPAKE2 key exchange, with a code that never leaves your PC

Before any terminal data flows, your computer and the app negotiate the session key with SPAKE2, a password-authenticated key exchange. The password used in that exchange is the Security Code: it is generated and stored locally on your PC, never uploaded anywhere, and you are asked for it whenever you connect.

Because the code lives only on the machine it protects, it works as a second layer on top of your account. An attacker who obtained your account credentials would still be asked for the Security Code when connecting to your PC — account access alone is not enough.

Layer 3 · Payload

AES-256-GCM on every keystroke and byte

All application data is encrypted with AES-256-GCM before it leaves your device — authenticated encryption for every keystroke and byte of output. The same applies to the file browser and to localhost and LAN traffic: terminal content, files, and web requests all ride the same encrypted payload channel.

The "authenticated" part matters as much as the "encrypted" part: GCM ties an authentication tag to each payload, so tampering with data in transit is detected rather than silently passed through.

Relay

What the relay can see: ciphertext, nothing else

When a direct path is not available, traffic passes through our relay. The relay's job is forwarding — and that is all it can do. Since application data is encrypted with AES-256-GCM before it leaves your device, and the session key was negotiated directly between your devices, the relay only ever forwards ciphertext.

Your keystrokes, terminal output, and files are readable by your devices alone.

Account

Sign-in gets you the device list, not the terminal

The account layer is deliberately thin. Signing in is required to see your devices — it is how your phone finds your PCs — but it does not grant access to a session. Each PC adds its own locally generated Security Code on top, asked for at connect time.

One account can link multiple computers, and each of them keeps its own independent Security Code. For how the pieces fit together day to day, see how CLIAnywhere works.

What this protects against — and what it does not

A security page should state its boundaries as clearly as its guarantees.

Protected against

  • The relay reading your session. When traffic is relayed, the relay only ever forwards ciphertext — keystrokes, terminal output, and files are readable by your devices alone.
  • Stolen account credentials alone being enough to connect. Each PC requires its own Security Code, generated and stored locally on that machine and never uploaded.
  • Exposing your computer to inbound connections. The daemon connects outbound only; there is no port to forward and no public IP to expose.
  • Unauthenticated transport. Direct links use DTLS, relay fallback uses WSS, and every payload carries AES-256-GCM authentication.

Honest boundaries

  • A compromised endpoint. If malware runs on your PC or your phone, it sees the terminal and the keystrokes at the source. No transport-layer design changes that, and we do not claim otherwise.
  • A leaked Security Code. The code is a secret — anyone who has it, together with account access, can attempt to connect. Keep it to yourself.
  • Physical access to your devices. Encryption between devices does not lock the screen of either one.
Open source, so you can check. The daemon that implements the handshake and encryption is published at github.com/CLIAnywhere/clianywhere_daemon — you can read the code and build it yourself rather than taking this page's word for it. A shorter summary also lives in the security section of the homepage.

Security facts, at a glance

Every row below is the complete claim — nothing stronger is implied.

Direct P2P transportYes — DTLS
Relay fallback transportYes — WSS
Key exchangeSPAKE2 (password-authenticated)
Payload encryptionAES-256-GCM, applied before data leaves the device
Security Code storageGenerated and stored locally on each PC, never uploaded
Relay visibilityCiphertext only — forwarding, nothing else
Account layerSign-in required to see devices; per-PC Security Code on top
Port forwarding / public IP requiredNo
Open-source daemonYes
HostsWindows, macOS, Linux
ClientsiOS, Android, Web App
Account modelOne account, multiple PCs, per-PC local Security Code

Common questions about the encryption

Short, direct answers to the questions people ask most.

No. When traffic passes through the relay, the relay only ever forwards ciphertext. All application data is encrypted with AES-256-GCM before it leaves your device, and the session key is negotiated directly between your computer and the app with SPAKE2. Your keystrokes, terminal output, and files are readable by your devices alone.
The Security Code is a per-computer secret that authenticates the SPAKE2 key exchange between the daemon on your PC and the app you are connecting with. It is generated and stored locally on that machine; it never leaves your PC and is never stored on our servers. You are asked to enter it each time you connect to that computer.
Signing in with your account is required to see your devices, but it is not enough to connect to them. Each PC is protected by its own Security Code, which is generated and stored locally on that machine and never uploaded. An attacker who obtains your account credentials would still be asked for that code when connecting, which provides an additional layer of protection.
Both, depending on the network path. Direct peer-to-peer connections between your devices are established over DTLS. When no direct path is available, traffic falls back to a WSS relay. Either way the transport is secure, and the end-to-end AES-256-GCM payload encryption is applied before data leaves your device, independently of which transport carries it.
No, and we do not claim that it does. The encryption described on this page protects data in transit and keeps the relay limited to forwarding ciphertext. If the endpoint itself is compromised — for example malware running on your PC or your phone — that software can observe the terminal or the keystrokes at the source. Endpoint security remains your responsibility.

Related

Read the code, then run it

The daemon that implements all of this is open source — verify first if you want to.

View on GitHub Download App