Skip to content

SSH and SFTP

An SSH tab prints Connecting to <host>:<port>..., then the host key check, the server banner and the login. A failure ends with a red line; the tab then shows Session closed. Press R to reconnect or ⌘W to close the tab. (Windows: Ctrl+Shift+W) (the key is set in Settings → Keyboard Shortcuts) The steps are described in SSH sessions → Connection and host key.

KryoDesk speaks SSH itself (russh); it does not run /usr/bin/ssh and does not read ~/.ssh/config. A host that works with ssh through ProxyJump, HostName aliases or per-host options in ~/.ssh/config needs the real host name, port and login in the session.

cannot connect to <host>:<port>: failed to lookup address information: nodename nor servname provided, or not known

Section titled “cannot connect to <host>:<port>: failed to lookup address information: nodename nor servname provided, or not known”
  • Cause: the name does not resolve.
  • Check: dscacheutil -q host -a name <host>; with a VPN, whether its DNS is in use (scutil --dns).
  • Fix: correct the host name, connect the VPN, or enter the IP address.

cannot connect to <host>:<port>: Connection refused (os error 61)

Section titled “cannot connect to <host>:<port>: Connection refused (os error 61)”
  • Cause: the host answered with a TCP reset: nothing listens on that port, or a firewall rejects.
  • Check: on the server ss -tlnp | grep sshd and Port in /etc/ssh/sshd_config; the Connection test → Ping shows refused (RST).
  • Fix: the right port in the session, sshd running, a firewall rule for this address.

connection to <host>:<port> timed out after 15s

Section titled “connection to <host>:<port> timed out after 15s”
  • Cause: the TCP connect and SSH handshake did not finish in 15 s: packets dropped by a firewall, the host down, or the server stuck before its banner (overloaded, MaxStartups reached).
  • Check: Connection test → Identify service: timeout after 3 s = network; Connected but no Service: SSH = the server.
  • Fix: firewall or security group, host state; on the server journalctl -u ssh (or sshd).

cannot connect to <host>:<port>: No route to host (os error 65)

Section titled “cannot connect to <host>:<port>: No route to host (os error 65)”

For an address in your local network this is usually macOS blocking KryoDesk’s local network access: see macOS: No route to host in the local network. For other addresses: route -n get <ip>.

cannot connect to <host>:<port>: Network is unreachable (os error 51), Host is down (os error 64)

Section titled “cannot connect to <host>:<port>: Network is unreachable (os error 51), Host is down (os error 64)”

No route to that network (VPN off, interface down), or no ARP answer from a host in the same subnet. netstat -rn, arp -an.

cannot connect to <host>:<port>: No common Kex algorithm - ours: […], theirs: […]

Section titled “cannot connect to <host>:<port>: No common Kex algorithm - ours: […], theirs: […]”

Also No common Key algorithm, No common Cipher algorithm, No common Mac algorithm.

  • Cause: the server offers only algorithms the SSH library does not use (old servers and network devices: diffie-hellman-group1-sha1, ssh-dss, CBC ciphers). Both lists are printed.
  • Check: ssh -vv <host> 2>&1 | grep -i 'kex\|host key', or SSH Audit… in the Connection test.
  • Fix: enable a current algorithm on the server (KexAlgorithms, HostKeyAlgorithms, Ciphers, MACs in sshd_config). KryoDesk has no option to turn on more algorithms.

The server closed the connection during authentication (too many failed attempts? see MaxAuthTries in sshd_config).

Section titled “The server closed the connection during authentication (too many failed attempts? see MaxAuthTries in sshd_config).”
  • Cause: sshd drops the connection after MaxAuthTries failed methods (default 6). With Auto, every key in the system agent and every built-in agent key counts as one attempt before the password.
  • Check: ssh-add -l (keys offered by the agent); on the server sshd -T | grep maxauthtries.
  • Fix: Private key only or Password only in the session, fewer keys in the agent, or a higher MaxAuthTries.

The authenticity of host '<host>' can't be established.

Section titled “The authenticity of host '<host>' can't be established.”

The host is not in ~/.ssh/known_hosts. Compare the printed SHA-256 fingerprint with the server’s: ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub on the server. yes adds it; any other answer ends with cannot connect to <host>:<port>: Unknown server key.

WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

Section titled “WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!”
WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
The ssh-ed25519 key of '<host>' is now SHA256:….
It does not match ~/.ssh/known_hosts line <n>.
Someone could be intercepting the connection. Connection refused.
  • Cause: the key differs from line <n> of ~/.ssh/known_hosts: the server was reinstalled, its keys regenerated, the address now belongs to another host, or the connection is intercepted.

  • Check: the fingerprint on the server (console, another trusted path): ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub.

  • Fix: after checking, remove the old entry and connect again:

    Terminal window
    ssh-keygen -R <host> # port 22
    ssh-keygen -R '[<host>]:<port>' # other ports

    KryoDesk has no button to accept a changed key.

cannot check known_hosts: …, Could not update known_hosts: …

Section titled “cannot check known_hosts: …, Could not update known_hosts: …”

~/.ssh/known_hosts cannot be read or written (permissions, a directory or a symlink in the way). ls -la ~/.ssh; the file should belong to you with mode 0600 or 0644.

KryoDesk uses the publickey and password methods. It does not use keyboard-interactive: a server with PasswordAuthentication no and KbdInteractiveAuthentication yes (PAM, one-time codes) rejects every password.

The server rejected the typed password. After 3 passwords:

Authentication failed for <user>@<host>:<port>. Enter another login to reconnect (attempt 2/3), Ctrl+C or empty to cancel.

and after 3 logins authentication failed for <user>@<host>:<port> (3 logins tried).

  • Check: on the server journalctl -u ssh -n 50 (or /var/log/auth.log, /var/log/secure) shows the reason: wrong password, AllowUsers/DenyUsers, a locked account, PasswordAuthentication no.

Password saved in Keychain (password:<user>@<host>:<port>) was rejected; it stays there until you save a new one.

Section titled “Password saved in Keychain (password:<user>@<host>:<port>) was rejected; it stays there until you save a new one.”

The saved password no longer works. Type the current one; after the login answer y to Replace password saved in Keychain? [y/N]. The old one stays because a rejection can also come from a second factor or a dropped connection.

… accepted, but the server requires another method as well (partial success; remaining: […]), which is not supported yet.

Section titled “… accepted, but the server requires another method as well (partial success; remaining: […]), which is not supported yet.”

The server uses AuthenticationMethods with two methods (for example publickey,password or publickey,keyboard-interactive). KryoDesk cannot complete the second one; the login ends.

this session uses a private key, but no key file is set

Section titled “this session uses a private key, but no key file is set”

Authentication is Private key only and Use private key is empty. Set the key or switch to Auto.

Message Cause and fix
cannot read key <path>: No such file or directory (os error 2) The path in the session or in Settings → Connections → SSH Agent does not exist. ~/ is expanded; other shell syntax is not.
cannot load key <path>: … Not a private key: for example the .pub file. OpenSSH, PEM (PKCS#1, PKCS#8) and PuTTY .ppk private keys are read.
Passphrase saved in Keychain for <path> is wrong. The passphrase changed; type the new one.
Wrong passphrase. Up to 3 tries; an empty answer skips the key.
<path> is a FIDO security key ([email protected]): the file holds only a handle, the device signs. … Load it with the printed ssh-add command and use the system agent (guide).

A key is accepted by the server only if its public part is in ~/.ssh/authorized_keys of the login on the server (mode 0600, ~/.ssh 0700, owned by the user; StrictModes yes refuses other modes). The server log says Authentication refused: bad ownership or modes in that case.

Message Cause and fix
SSH agent <path> (Settings → Connections → SSH Agent): … The socket set in Settings → Connections → SSH Agent cannot be opened. Check the path: ls -l <path>.
(nothing; the agent keys are skipped) Without a socket in Settings, KryoDesk uses SSH_AUTH_SOCK of its own process. An app started from Finder gets the launchd agent; one started from a shell gets that shell’s variable. launchctl getenv SSH_AUTH_SOCK shows the launchd one.
Touch the security key: <algorithm> <fingerprint> The server accepted a FIDO key; touch it.
The agent refused to sign with <fingerprint> after <n> s (SSH_AGENT_FAILURE): no touch in time, wrong or missing PIN, the key not plugged in, or an agent built without FIDO support. As listed.
The agent did not sign with <algorithm> <fingerprint> after <n> s: … The agent’s own error (1Password or Secretive asking for approval and denied, agent locked).
Message Cause
the server refused to run the shell The server refused the shell request (a ForceCommand, a restricted account, nologin).
Session closed (exit code N) The remote shell ended with that code.
Tab closes after a network drop KryoDesk sends an SSH keepalive every 30 s and closes the connection after 3 unanswered ones (about 90 s). With a persistent session the shell keeps running in tmux or screen; R reconnects to it.

The SFTP panel and the Files window use the tab’s SSH connection; they appear after the login.

Message Cause and fix
cannot open an SFTP channel: … The server refused another channel on the connection, typically MaxSessions 1 in sshd_config (the shell already uses it). Raise MaxSessions, or open the session with Open files (SFTP only) (no shell, the only channel goes to SFTP).
the server refused the SFTP subsystem No Subsystem sftp line in sshd_config, or ForceCommand for this login.
cannot start SFTP: … The subsystem started but did not speak SFTP: usually a login script (~/.bashrc) that prints text for non-interactive shells. Test with ssh <host> -s sftp </dev/null | head -c 100.
cannot read <path>: …, cannot create <path> (does it already exist?), cannot remove <path> The SFTP server’s error for that path (permissions, a missing folder).
sudo asks for a password to act as <user>; only passwordless sudo (NOPASSWD) is supported (<sudo's message>) Become terminal user runs sudo -n -u <user> true first. It needs a NOPASSWD rule for the login; check with sudo -n -u <user> true; echo $? in the terminal.
no sftp-server found on the host Become terminal user looks for sftp-server in /usr/lib/openssh/, /usr/libexec/openssh/, /usr/lib/ssh/, /usr/libexec/, /usr/lib/. find / -name sftp-server 2>/dev/null on the server.

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