Skip to content
moshpit

Docs · Topic

When it can't connect

When a connection fails, the host card on Home names what answered (or failed to answer) and why, instead of showing a generic socket error.

What Moshpit says Cause and fix
dev.example.com refused the connection on port 22 The machine is reachable, and nothing is listening on that TCP port (or a host firewall rejected it). Verify Port in Edit connection and confirm sshd is running on the server.
Couldn't find dev.example.com DNS returned no address for the hostname. Check Host in Edit connection for typos, and make sure you entered only the hostname or IP—not ssh user@host or a URL.
Couldn't find box.local on your local network / Couldn't reach 192.0.2.10 on your local network Shown for .local names and LAN addresses when iOS may be blocking local discovery or LAN packets. Open iOS Settings › Privacy & Security › Local Network and turn on Moshpit, then check that your phone is on the same network and the machine is powered on.
dev.example.com didn't answer / Timed out Packets went out and nothing came back before the timeout. Check the address, confirm the machine is powered on, and verify that inbound TCP on Port (or UDP 60000–61000 if Mosh fails after SSH succeeds) is open in your server firewall and cloud security group.
There's no route to 192.0.2.10 from this network Your phone’s current Wi-Fi or cellular network has no route to that address—for example, a private subnet that is only reachable from your office LAN or through a jump host.
  • Sign-in failed (Authentication failed): the server answered SSH, and rejected your User and Password or SSH key. Check the username in Edit connection. For keys, confirm the public key is in ~/.ssh/authorized_keys on the host and that permissions are 700 on ~/.ssh and 600 on authorized_keys.
  • The server rejected this sign-in method: for example, PasswordAuthentication no is set in sshd_config while the connection uses Password. Switch Sign in with to SSH key in Edit connection.
  • The saved password or key isn't on this iPhone: happens after restoring onto a new phone from backup. Re-enter the password in Edit connection or tap Import Again… under Settings › SSH keys; see Hosts and keys.

Connections configured with Connect via separate bastion problems from target problems:

  • Jump host “login.example.com”: …: the failure happened reaching or signing in to the jump host itself. Tap Edit jump host… inside Edit connection to fix its address, port, or credentials.
  • The jump host “login.example.com” doesn't forward connections: turn on AllowTcpForwarding yes in sshd_config on the jump host and reload sshd.
  • The jump host “login.example.com” couldn't reach gpu01.example.com on port 22 (or got no answer … in time): SSH reached the jump host, and the jump host could not open TCP to the target’s Host and Port. Test ssh dev@gpu01.example.com from a shell on the jump host.
  • Deleted or chained jump host: if the jump host connection was deleted, or itself uses Connect via, open Edit connection and pick a jump host that connects Direct.

When a server presents a different host key than the one you trusted earlier, Moshpit stops before sending credentials and shows Host Key Changed (and The host’s key changed on Home) alongside the Stored and Offered now SHA256 fingerprints.

Tap Disconnect if the change is unexpected. Only tap Trust New Key after confirming out-of-band with ssh-keygen -lf /etc/ssh/ssh_host_*_key.pub on the server that its host key legitimately changed.