Skip to content

SSH sessions

An SSH session opens a terminal tab over SSH. The same connection serves the SFTP panel, the Files window and the monitoring bar under the tab. KryoDesk speaks SSH itself (Rust russh); it does not run /usr/bin/ssh and does not read ~/.ssh/config.

Fields shared by all types (host, port, login, name, folder, comments) are on the Session dialog page.

Advanced SSH settings: authentication and private key

Field Values Default What it does
Authentication Auto (agent, keys, then password), Private key only, Password only Auto Which methods are tried and in which order (see below).
Use private key + path + Browse… Path of an OpenSSH or PEM private key, ~/ allowed Off The key file of this session. Browse… opens in ~/.ssh. Required with Private key only; disabled with Password only.
Persistent session Off: plain shell, ends with the connection, Auto: tmux, else screen, tmux: scrollback and mouse of the tab, tmux classic: tmux keys, status line, splits, screen Off Whether the shell lives in a tmux or screen session on the server that survives a dropped connection. See Persistent sessions.
Session name 1–64 characters A–Z a–z 0–9 _ -, not starting with - kd-<session name> (other characters become -) Name of the tmux/screen session. Disabled when Persistent session is Off.

With Auto KryoDesk tries, and stops at the first that the server accepts:

  1. System SSH agent, when Use the system SSH agent is on in Settings: every identity of the agent, in the agent’s order.
  2. Built-in agent keys from Settings, in the listed order.
  3. The session’s private key, if set.
  4. Password: first the one saved in the vault (password:<user>@<host>:<port>), then up to 3 typed attempts.

Private key only tries step 3 only (and fails with this session uses a private key, but no key file is set without a key). Password only tries step 4 only.

Each server attempt counts against its MaxAuthTries (OpenSSH default 6). With many agent identities the server may close the connection before the right key or the password; KryoDesk then reports The server closed the connection during authentication (too many failed attempts? see MaxAuthTries in sshd_config). Use Private key only or Password only for such hosts.

A server that answers “partial success” (it accepted one method and requires another, such as a key plus an OTP) is reported with the remaining methods and the login stops: keyboard-interactive and second factors are not supported.

After a rejected login KryoDesk asks for another login and opens a new connection (servers drop the connection when the user changes); at most 3 logins per tab.

  • An encrypted key asks Enter passphrase for key '<path>': in the tab. The passphrase saved in the vault (key-passphrase:<path>) is tried first. After a correct passphrase: Save passphrase in Keychain? [y/N]. An empty passphrase or Ctrl+C skips the key.
  • A decrypted key stays in memory for all tabs until Unload Keys in Settings, the app lock or quitting the app. Open connections keep running after the lock; the next connection decrypts the key again.
  • FIDO security keys ([email protected], [email protected]) cannot be used as a key file: the file holds only a handle and the device signs. KryoDesk refuses it with the ssh-add command to run. Load the key into an SSH agent with FIDO support and use the system agent; the tab then shows Touch the security key: <algorithm> <fingerprint> when the server accepts the key.

The tab asks for the passphrase of an encrypted key

The tab asks for the passphrase of an encrypted key file.

The prompt is <user>@<host>'s password:. After a successful typed password KryoDesk asks Save password in Keychain? [y/N] (or Replace password saved in Keychain?). A saved password that the server rejects is reported and kept until a new one logs in.

A login typed at login as: for a saved session without a login can be stored in the session: Save login '<user>' in session '<name>'? [y/N].

What the tab prints, in order:

  1. Connecting to <host>:<port>... The TCP connect and SSH handshake have 15 s; then connection to <host>:<port> timed out after 15s.
  2. The host key is checked against ~/.ssh/known_hosts (plain and hashed entries; the entry is host for port 22, [host]:port otherwise).
    • Unknown host: The authenticity of host '<host>' can't be established., the key type and SHA-256 fingerprint, then Are you sure you want to continue connecting (yes/no)?. yes appends the key to ~/.ssh/known_hosts (Permanently added …).
    • Changed key: WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! with the new fingerprint and the known_hosts line that does not match. The connection is refused; there is no option to continue. Remove the old line yourself (for example ssh-keygen -R '[host]:port') after checking the new key.
  3. The server’s banner (Banner in sshd_config), if any.
  4. Authentication as above.

The connection sends an SSH keepalive every 30 s; after 3 unanswered ones it is closed.

When the session ends the tab stays and prints Session closed (exit code N). Press R to reconnect or ⌘W to close the tab.; the reconnect key (default R) is set in Settings → Keyboard Shortcuts.

A changed host key: the warning, both fingerprints and the stopped connection

A host key that differs from the one in known_hosts stops the connection.

Persistent session set to Auto

With a mode other than Off, after login KryoDesk runs a detection script through /bin/sh on the server (10 s limit): it looks for tmux and screen with command -v, reads their versions and checks whether a session with the name already exists. If the script fails, the tab says Could not check for tmux/screen (…); starting a plain shell. Otherwise:

Mode tmux ≥ 3.0a older tmux only screen neither
Auto tmux, integrated (control mode) tmux classic screen plain shell
tmux tmux, integrated tmux classic plain shell plain shell
tmux classic tmux classic tmux classic plain shell plain shell
screen plain shell plain shell screen plain shell

The tab prints what was found and the exact command in grey. A plain shell is used with the reason (for example tmux is not installed (found: screen 4.09.01 (/usr/bin/screen))).

How it attaches Command on the server In the tab
tmux, integrated tmux -u -C new-session -A -s <name> -x <cols> -y <rows> (control mode, on an exec channel) The tab’s own scrollback, mouse and selection; tmux key bindings and status line are not used. After attaching, KryoDesk restores the pane’s history and screen.
tmux classic tmux new-session -A -s <name> ; set-option -q mouse on ; set-option -q destroy-unattached off A normal tmux client: its keys, status line and splits. The mouse wheel scrolls tmux history (copy mode).
screen screen -x <pid.name> when it exists, else screen -S <name> -c <rc> The rc file sources ~/.screenrc and adds termcapinfo xterm* ti@:te@, defscrollback 10000, autodetach on; it stays in $TMPDIR as kryodesk-screenrc.*.

All commands run under /bin/sh -c, whatever the login shell is.

new-session -A attaches to an existing session of that name, so a second tab with the same session shows the same shell.

The terminal’s context menu adds, for a tab attached to tmux or screen:

  • Detach from tmux ‘’: ends the tab’s connection, the session keeps running.
  • End tmux session ‘’…: asks, then kills exactly that session on the server (tmux kill-session -t <name>, screen -S <pid.name> -X quit), ending every program in it.

Closing the tab only detaches. To open one tab without changing the saved session, use Execute in tmux/screen or Execute without tmux/screen in the tree’s context menu.

See also the guide Keep shells running with tmux.

Terminal context menu of a tmux tab with Detach and End

The context menu of a tab attached to tmux.

Settings that apply to all SSH sessions, saved in settings.json.

Field Default What it does
Use the system SSH agent (SSH_AUTH_SOCK) On Step 1 of Auto authentication.
Agent socket Empty = SSH_AUTH_SOCK of the app’s environment Path of another agent socket (for example the one of 1Password or Secretive). ~/ is expanded. A socket that cannot be opened is reported in the tab.
Built-in Agent Keys Empty Private key files tried in step 2. Each line shows algorithm, SHA-256 fingerprint, comment and whether it is loaded. Add Key… picks files in ~/.ssh; the trash icon removes a key from the list.
Unload Keys Forgets all decrypted keys now (no Apply needed).

A macOS app started from the Dock gets the SSH_AUTH_SOCK of launchd, which points to the system ssh-agent, not to an agent started in a shell profile. Set Agent socket for another agent. See Connect with an SSH key through an agent.

Scroll or pinch to zoom · drag to move · double-click to zoom · Esc or click outside to close