Reading connection logs
A ZestSSH connection log is an ordered record of what the app did to reach your server, from loading your credentials to opening the shell. Because it runs top to bottom through fixed stages, the last line that succeeded tells you where the problem is. Most of diagnosing a failed connection is reading down to where it stopped, then reading this page’s section for that stage.
Where to find the log
Section titled “Where to find the log”- While connecting: on a phone, the connecting screen shows the log live as it grows. On a computer, the connecting view shows its last five lines.
- After a failure: open Technical details on the failure screen or dialog. Copy details copies the whole report, with the connection’s log in it. Paste it as it is when you ask for help: the lines before the failure prove which stages worked.
The report is scrubbed before it is copied: names of hosts, people and folders, addresses, keys and passwords are taken out, whether or not recording mode is on, and the report says so at its end. So in a copied report you see stand-ins such as host-12 where your own names were. The report has these parts:
What:what went wrong, as the app said it, andWhere:(for a connection, “Connecting to a host”).Error:the error as the SSH library or the system gave it.Details:the kind of failure (Kind: refused,Kind: authFailedand so on) and the connection’s log.App:,System:andTime:.Log, the last lines before it (oldest first):the app’s own last log lines. The app keeps the last 200 lines in memory while it runs, never writes them to disk and sends them nowhere.
Lines of the connection log start with the stage that wrote them, for example tcp_connect:, ssh_kex:, ssh_hostkey: and ssh_auth:. Lines that start with debug: come from the SSH engine itself and carry its internal step names, like SSHClient._authWithPublicKey. They are written until sign-in succeeds.
The stages, in order
Section titled “The stages, in order”A successful connection walks these stages in order. Find the last one that wrote a success line; the failure is in the stage after it.
Setup and the key: init:, identity:, jump:, shell:, connect:
Section titled “Setup and the key: init:, identity:, jump:, shell:, connect:”The first lines prepare the connection and load your credentials:
init: Preparing connection to <host>:<port>: ZestSSH is starting the connection.identity: Loading credentials..., thenidentity: Public key loaded for <user>oridentity: Password credentials loaded for <user>: ZestSSH read the SSH key or password of the host’s key (the log calls itidentity).identity: Key is encrypted, prompting for passphrase...means the private key needed a passphrase.jump: Building jump host chain…, thenjump: Connecting to <name> (<host>:<port>)for each jump host, when the host is reached through jump hosts.shell: Configuring terminal emulator: preparing the terminal.connect: Initiating connection..., thenResolving <host>...: opening the connection, with a name lookup for the address.tunnel: Using pre-established tunnel to <host>:<port>: shown instead ofResolvingwhen the connection goes through a jump host.
Failing here is local: a key that is not there, a cancelled prompt (identity: User cancelled password prompt), or a name that does not resolve.
What the setup lines rule out
Section titled “What the setup lines rule out”identity: Public key loaded for <user>confirms the key exists and loaded on your device. If a later line shows a sign-in failure, the problem is the server refusing the key, not a missing or unreadable key here. It does not rule out the wrong key being chosen: the app can load a key the server has never seen.identity: Loading credentials...with no... loaded ...line after it means the host’s key itself failed to load: a key that is gone (identity: ERROR - private key not found in storage), a damaged key file (identity: ERROR - the private key cannot be read (...)), or a wrong passphrase (identity: ERROR - wrong passphrase for encrypted key). That is a problem on your device, entirely different from a refusal by the server.- The
<user>inPublic key loaded for <user>is the account you sign in as. Check that it is the account that has your public key in~/.ssh/authorized_keyson the server: a wrong user name fails exactly like a missing key.
Network path: tcp_connect: Connected
Section titled “Network path: tcp_connect: Connected”tcp_connect: Connected to <host>:<port> is the single most important line in the log.
If you see tcp_connect: Connected, the network is fine. Stop checking firewalls, routing, port numbers and VPNs. The connection to the server’s SSH port is open. Everything after this line is the SSH protocol and sign-in, not networking.
If the log stops before this line, the problem is the network path: see “Fails before tcp_connect” below.
Protocol negotiation: ssh_session: Starting SSH-2.0
Section titled “Protocol negotiation: ssh_session: Starting SSH-2.0”ssh_session: Starting SSH-2.0 protocol negotiation, followed by debug: SSHTransport._processVersionExchange and debug: SSHTransport._remoteVersion = "...", means the server answered and said it speaks SSH. The quoted text is the server’s version, for example SSH-2.0-OpenSSH_9.6.
If tcp_connect succeeded but you never see _remoteVersion, you reached something that is not an SSH server: a web server, a proxy, or the wrong port.
Sign-in starts, and the algorithms are offered
Section titled “Sign-in starts, and the algorithms are offered”ssh_auth: Authenticating as <user> (<method>)names the account and the way ZestSSH will try:publickey,publickey, then the password saved with the key,password, ornone.ssh_compat: Legacy algorithm support enabled (CBC ciphers, hmac-md5 and the SHA-1 key exchanges included; never DH group 1)appears when the host has Compatibility mode on.ssh_kex: Offering KEX: ...,ssh_cipher: Offering ciphers: ...andssh_mac: Offering MACs: ...list the algorithms ZestSSH offered. The key exchange list starts with the two post-quantum hybrids,mlkem768x25519-sha256andsntrup761x25519-sha512.ssh_agent: Agent forwarding enabledappears when the host has Forward SSH agent on.
Algorithm negotiation: _kexType
Section titled “Algorithm negotiation: _kexType”debug: SSHTransport._handleMessageKexInit, thendebug: SSHTransport._kexType: SSHKexType(<name>): the key exchange the two sides agreed on. The cipher and MAC agreed on follow as_clientCipherType: SSHCipherType(<name>)and_clientMacType: SSHMacType(<name>).- After sign-in,
ssh_kex: Negotiated <kex>, cipher <cipher>, host key <type>says the outcome in one line, with(post-quantum hybrid)added when a hybrid was used. This is the quickest way to check it on a phone. On a computer, the session header’s Inspector shows the same under Session, Details: its Key exchange row has a Post-quantum badge for a hybrid.
Reaching a _kexType line proves the encrypted channel is up. Failing here means no algorithm is supported by both sides: see “No algorithm in common” below.
Host key check: ssh_hostkey: Verifying host key
Section titled “Host key check: ssh_hostkey: Verifying host key”ssh_hostkey: Verifying host key (<type>) then ssh_hostkey: Host key accepted means the server proved who it is and matched what ZestSSH has saved (or you trusted it the first time).
ssh_hostkey: Host key REJECTED means the key was not accepted: you declined a new or changed key, or ZestSSH refused it (the line then names why in parentheses, for example a key that is too short). Reaching Host key accepted proves the encryption and the server’s identity are both good, so anything failing after it is the sign-in, not the server. A changed host key is security-critical: see “Host key changed” below.
Sign-in: _authWithNone, _authWithPublicKey
Section titled “Sign-in: _authWithNone, _authWithPublicKey”The debug: lines trace each try:
debug: SSHClient._authWithNone: first of all, ZestSSH asks the server which ways of signing in it takes. Nothing is sent with this question.debug: _currentAuthMethod = SSHAuthMethod.publicKey, thendebug: SSHClient._authWithPublicKey: offering a key.debug: SSHClient._authWithPassword: sending a password.debug: SSHClient._handleUserauthFailure: the server said no to that step.ssh_auth: Server sent a login banner: the server sent a login message before the sign-in. In a session, ZestSSH prints it, dimmed, at the top of the terminal once the session opens.ssh_auth: The banner has a link to <host>; waiting for the sign-in to be finished there: the message has anhttps://link (Tailscale SSH in check mode sends one), and the sign-in is one that shows the Finish signing in dialog: a session, Run on hosts, Install on hosts… or a workflow you run yourself. A jump host’s own message, a serial console session, Test full connection, Server Monitor and an automation that runs by itself never log this line. ZestSSH shows it in a Finish signing in dialog and waits up to 5 minutes for you to approve on that page. See Sign-in links, and its list of where the dialog does not appear.ssh_auth: Sending credentials: a saved password is going to the server.ssh_auth: SSH_AUTH_SUCCESS - authenticated: you are in.
ZestSSH tries only ways the server says it takes. If you reach sign-in and see _handleUserauthFailure with no success line, the server refused your credentials: see “All authentication methods failed” below.
Session open: ssh_channel: Opening PTY
Section titled “Session open: ssh_channel: Opening PTY”After sign-in, ssh_channel: Opening PTY (xterm-256color) then ssh_session: Shell session established means the server started a shell and the session is live; ready: Session established ✓ ends the log. If the log has ssh_channel: No session - ... instead, the server signed you in but opened no shell, and ZestSSH says so (for example “The host signed you in, but gave no terminal.”). The usual causes are on the server: a forced command, a key marked no-pty, or an account with no shell.
All authentication methods failed
Section titled “All authentication methods failed”If your log reaches this, your connection is fine: the network, the encryption and the host key all checked out. The server refused your credentials for that user. Stop looking at your side and look at the server.
This is the most common real failure, and its log looks like this (with a user called deploy):
identity: Public key loaded for deploytcp_connect: Connected to 192.168.10.5:22ssh_auth: Authenticating as deploy (publickey)ssh_hostkey: Host key accepteddebug: SSHClient._authWithNonedebug: _currentAuthMethod = SSHAuthMethod.publicKeydebug: SSHClient._authWithPublicKeydebug: SSHClient._handleUserauthFailureerror: Auth failed - SSHAuthFailError(All authentication methods failed)The error in the report also says what was tried and what the server takes, for example [tried: publickey] [the server takes: publickey,password], and the app says the same in words (“The server also takes: a password.”).
identity: Public key loaded for deploy near the top rules out a missing or unreadable key on your device (but not the wrong key being chosen), and it is not a network, firewall or cipher problem either. The causes, most common first:
- The public key is not in
~/.ssh/authorized_keysfor that user on the server. Add the matching public key to that file. - Permissions are too open. OpenSSH ignores keys unless
~/.sshis700and~/.ssh/authorized_keysis600, owned by that user. A home folder others can write to fails the same way. - The wrong key is chosen in ZestSSH. The key picked in this host’s Key field is not the one on the server. A loaded key does not rule this out.
- The wrong user name.
rootandadminare different accounts with differentauthorized_keysfiles. TheAuthenticating as <user>line shows which one was sent. - The server does not allow it:
PubkeyAuthentication no, or anAllowUsers/AllowGroupsrule that leaves the account out, insshd_config.
To see the server’s own reason, check its sign-in log: /var/log/auth.log on Debian and Ubuntu, or journalctl -u sshd on systemd hosts.
Why PasswordAuthentication is not your fix here
Section titled “Why PasswordAuthentication is not your fix here”If [tried: ...] names only publickey and you never see debug: SSHClient._authWithPassword or ssh_auth: Sending credentials, no password was sent. The host’s key has no password, or the server does not take one. Changing PasswordAuthentication in sshd_config will not fix this. Fix the key causes above instead.
Other failure shapes
Section titled “Other failure shapes”Fails before tcp_connect
Section titled “Fails before tcp_connect”If the log stops at Resolving <host>... and never reaches tcp_connect: Connected, the problem is the network path, not SSH: the server is unreachable, the port is wrong (the default is 22), a firewall or security group drops the connection, the server is not on your VPN or jump network, or the name does not resolve. Check the address and port, and that the server can be reached from this device. See Connection issues.
A jump host failed
Section titled “A jump host failed”With jump hosts, a failing hop writes jump: <name> failed (<stage>) - <error>, where the stage is details (its credentials), reach (it could not be reached), signIn or onward (it did not open the way to the next host). The app names the jump host in its message too. See Setting up jump hosts.
No algorithm in common
Section titled “No algorithm in common”If you reach ssh_kex: Offering KEX but never get a _kexType, the two sides share no key exchange, cipher or MAC. The error in the report lists both sides: [ZestSSH offered: ...] [the server offers: ...] [Compatibility mode adds: ...]. When the last list is not empty, turning on Compatibility mode for the host fixes it: it also offers CBC ciphers, hmac-md5, the SHA-1 key exchanges, ssh-rsa host keys and RSA sign-in with SHA-1, and takes RSA host keys under 1024 bits. It never offers DH group 1. When the list is empty, no setting in ZestSSH helps: the server has to offer something newer.
Host key changed
Section titled “Host key changed”ssh_hostkey: Host key REJECTED, or the Host key changed warning, means the key the server showed is not the one ZestSSH saved. This is the security-critical case: the server may have been rebuilt, or someone may be intercepting the connection. Do not accept it casually. Check the new fingerprint another way before you trust it. See Host key verification.
Connects, then drops
Section titled “Connects, then drops”If the log reaches ssh_session: Shell session established and the session dies later, it is not a connection problem. The session says why it ended. Common causes: no keep-alive on an idle session behind a NAT or firewall that drops quiet connections, a phone putting the app to sleep in the background, or the server ending the session. Keep keep-alives on, and see Connection issues.
Names in the log are real names
Section titled “Names in the log are real names”Released builds of ZestSSH spell out the names of errors and algorithms in the log and in reports: SSHAuthFailError(All authentication methods failed), SSHKexType(curve25519-sha256@libssh.org), SSHCipherType(chacha20-poly1305@openssh.com), SSHMacType(hmac-sha2-512-etm@openssh.com). Read the value inside the parentheses as the error message or the algorithm’s name. (Versions before 3.0 showed short scrambled names here instead, such as Eub(...); there too, only the value inside the parentheses counts.)
Session log files are something else
Section titled “Session log files are something else”The connection log covers connecting. To keep what a session prints, turn on Log every session to a file (on a computer and on a phone in Settings > Terminal and SSH): see Session logs.