Skip to content

SSH protocol support

ZestSSH speaks the SSH 2.0 protocol. SSH 1.x is not supported: a server whose version line is neither SSH-2.0- nor SSH-1.99- (a server that also speaks SSH-2) is refused.

SSH-2.0, as defined by RFC 4253 (The Secure Shell Transport Layer Protocol). ZestSSH’s SSH engine is zest_ssh_core, an open-source, MIT-licensed fork of dartssh2. In the version exchange ZestSSH sends the identification string SSH-2.0-zest_ssh_core_0.4.0.

RFC Title Coverage
RFC 4250 SSH Protocol Assigned Numbers Identifiers and constants
RFC 4251 SSH Protocol Architecture Overall architecture
RFC 4252 SSH Authentication Protocol none, password, publickey
RFC 4253 SSH Transport Layer Protocol Key exchange, encryption, integrity
RFC 4254 SSH Connection Protocol Channels, sessions, forwarding
RFC 4256 Keyboard-Interactive Authentication keyboard-interactive
RFC 8308 Extension Negotiation ext-info-c, server-sig-algs
RFC 8332 RSA Keys with SHA-256 and SHA-512 rsa-sha2-256, rsa-sha2-512
Method RFC Supported
none RFC 4252 Yes, asked first (see below)
publickey RFC 4252 Yes
password RFC 4252 Yes
keyboard-interactive RFC 4256 Yes
hostbased RFC 4252 No
GSSAPI (Kerberos) RFC 4462 No

How ZestSSH signs in:

  1. It first sends a none request. Nothing is offered with it: the server answers with the methods it takes, or lets you in if it lets everyone in.
  2. It then tries only the methods the server listed: your keys while the server takes keys, then the password, then the server’s questions (keyboard-interactive, for one-time codes and other prompts).
  3. A key the server cannot take (for example an RSA key on a server that takes only SHA-1 RSA signatures, while Compatibility mode is off) is passed over, and the error says why if sign-in fails.

The publickey method covers plain keys, OpenSSH user certificates (*-cert-v01@openssh.com) and FIDO2 security keys (sk-*@openssh.com) used through your computer’s ssh-agent. See Supported key types.

See Supported key exchange algorithms for the full list.

ZestSSH offers the two post-quantum hybrid exchanges first (mlkem768x25519-sha256 and sntrup761x25519-sha512), then Curve25519, ECDH with NIST curves, Diffie-Hellman group exchange and Group 14. A server that has neither hybrid agrees on a classic exchange.

See Supported key types for the full list.

ZestSSH accepts Ed25519, RSA (rsa-sha2-512 and rsa-sha2-256, plus SHA-1 ssh-rsa in Compatibility mode) and ECDSA with NIST curves as host keys. RSA host keys shorter than 2048 bits are refused unless Compatibility mode is on (2048 bits is NIST’s floor until 2030; versions before 3.3.0 took 1024 bits and up), and RSA host keys longer than 16384 bits are always refused.

See Supported ciphers for the full lists of ciphers and MACs.

By default ZestSSH offers ChaCha20-Poly1305, AES-256-CTR, AES-128-CTR, AES-256-GCM and AES-128-GCM, in that order. Compatibility mode adds AES-CBC and hmac-md5.

Compatibility mode is a per-host switch in the host editor: on a computer under Auth > Show advanced options, on a phone under Advanced options. It adds older algorithms for servers that cannot be updated: the CBC ciphers, hmac-md5, the SHA-1 key exchanges, the SHA-1 ssh-rsa host key and user key signature, and RSA host keys of any length, shorter than 2048 bits too. The modern algorithms stay first, so a server that has them still agrees on them. Diffie-Hellman Group 1 is never offered.

Extension Source Supported
chacha20-poly1305@openssh.com OpenSSH Yes
aes128-gcm@openssh.com, aes256-gcm@openssh.com OpenSSH Yes
hmac-sha2-256-etm@openssh.com, hmac-sha2-512-etm@openssh.com OpenSSH Yes
curve25519-sha256@libssh.org libssh Yes
mlkem768x25519-sha256 OpenSSH (hybrid ML-KEM-768 + X25519) Yes
sntrup761x25519-sha512 (and @openssh.com) OpenSSH (hybrid Streamlined NTRU Prime 761 + X25519) Yes
kex-strict-c-v00@openssh.com OpenSSH (Terrapin mitigation, CVE-2023-48795) Yes
ext-info-c / server-sig-algs RFC 8308 Yes
rsa-sha2-256, rsa-sha2-512 RFC 8332 Yes
keepalive@openssh.com OpenSSH Yes (keep-alive requests)
auth-agent@openssh.com OpenSSH Yes (agent forwarding)

The strict key exchange and ext-info-c are announced in the first key exchange only. With server-sig-algs, the server tells ZestSSH which RSA signatures it takes, so an RSA key signs with what the server lists.

ZestSSH asks the server for new encryption keys by itself after 1 GiB of data or 2^31 packets in one direction under one set of keys, as OpenSSH does. A server may also ask for new keys at any time. During a rekey the server must show the same host key the session began with: if it shows another, the session ends and the app says why.

Channel type RFC Supported
session RFC 4254 Yes
direct-tcpip (local forwarding and SOCKS) RFC 4254 Yes
forwarded-tcpip (remote forwarding) RFC 4254 Yes
x11 RFC 4254 No: ZestSSH does not ask for X11 forwarding

Dynamic forwarding runs a SOCKS5 proxy on your device and sends each connection through a direct-tcpip channel. See Port forwarding and SOCKS proxy.

Subsystem Supported
sftp Yes
Algorithm Offered
none Yes (always)
zlib No
zlib@openssh.com No

ZestSSH offers only none, in both directions, so nothing is compressed. The host editor has a Zlib compression switch, but it has no effect on the connection.

ZestSSH sends keepalive@openssh.com requests at a set interval, so idle connections are not dropped by a firewall or the server.

  • The global setting: SSH keepalive interval in Settings (on a computer under Terminal and SSH; on a phone under Settings > Terminal and SSH). The default is 30 seconds; 0 turns keep-alive off for every host that uses the global setting.
  • Per host: Keepalive interval in the host editor. Default (global) uses the global setting; a custom value is 0 to 3600 seconds.

When three keep-alive requests in a row go by with nothing heard from the server, ZestSSH gives the connection up and says the host stopped answering.

SSH agent forwarding is supported and is turned on per host with Forward SSH agent in the host editor. When it is on, the server can ask ZestSSH to sign with the keys this connection signed in with, so you can, for example, git clone over SSH from the server without copying a key to it. ZestSSH answers from an in-memory agent that holds only those keys. In a team, a vault can turn agent forwarding off for its hosts. See SSH agent.

  • SSH 1.x
  • X11 forwarding
  • Host-based authentication
  • GSSAPI authentication
  • Compression
  • Host certificates: server host keys are checked by fingerprint (see Host key verification). User certificates are supported: see OpenSSH certificates.
  • ssh-dss (DSA) host keys and user keys