Per-host overrides
Once ZestSSH knows which network you are on, it resolves the connection: it takes the host’s base config and applies that network’s override for the host. This page covers what an override can change, how the two combine, and the host key check you should not skip.
An override belongs to one host on one network. It starts from the host’s base config and changes only the fields you fill in. Everything you leave empty is taken from the base.
What an override can change
Section titled “What an override can change”| Field in the editor | Effect on this network | If left empty |
|---|---|---|
| Address | Reach the host at another name or IP address | The base address |
| Port | Use another SSH port (1 to 65535) | The base port |
| Username | Sign in as another user | The username of the key in use |
| Key | Sign in with another saved key | The base key |
| Jump via | Route through these jump hosts, up to three, or (direct) for no jump host | As the host has it: the base jump route |
Instead of overriding, a row can be set to Mark unreachable from this network: ZestSSH then does not dial the host at all on that network.
Address and port
Section titled “Address and port”The most common override. At home your file server is 192.168.20.20:22; from anywhere else it is files.example.com. Set the address on the Home network and leave the base pointing at the public name. If only the address differs, leave the port empty.
Username and key
Section titled “Username and key”A network can change who you sign in as and which key proves it, for example admin on the office LAN and a restricted deploy user from elsewhere.
The username comes from the key, not from the host record. When an override sets no username, ZestSSH uses the username of the key in effect: the override’s key if it sets one, otherwise the base key’s. Set a username only when it must differ from the key’s own.
A session you open with Connect as (one of the host’s other accounts) signs in with that account on every network. A network’s key replaces only the host’s default key.
The jump route
Section titled “The jump route”An override’s Jump via list replaces the base route on that network. Add a hop with Add another hop (up to three) and remove one with Remove this hop. The list is used as written, nearest the host first.
Jump via has two more choices:
- (direct): on this network the host is reached with no jump host, even when the host itself has one (its Connect via) or the network sends its hosts through one.
- As the host has it: the host goes the way it goes itself, through its own jump host or none.
A network can also send all its hosts through one jump host (see Networks). A host with its own Connect via, or with an override on that network, keeps its own way.
Jump hosts are a Squeezed feature. On Free, the Jump via field is locked in the editor, and a route that reached the device another way (by sync or an import) is not used: the host connects directly and a notice says so, for example “File server: the jump host set for network Home needs Squeezed. Connecting directly instead.”
Mark unreachable
Section titled “Mark unreachable”Sometimes the right answer on a network is “do not try”. A host marked unreachable on a network is refused before anything is dialed, with the message “File server is set to skip on the Home network.” Use it for a lab machine that should never be dialed over cellular. On other networks the host connects as usual. The checks of whether hosts are reachable, where you turned them on, skip it too.
Port forwards in a network row
Section titled “Port forwards in a network row”For a saved host that has port forwards, each network row lists them under Port forwards with an Inherit / On / Off control. It decides which forwards start by themselves when you connect to the host on that network:
- On: the forward starts on this network, even if it is not set to start automatically or is pinned to another network with Run on network….
- Off: the forward never starts by itself on this network.
- Inherit: the forward follows its own Start automatically switch and, on a computer, its Run on network… choice. See Port forwarding.
How the two combine
Section titled “How the two combine”When you connect, the base and the override are combined field by field: the override wins where it sets a value; otherwise the base is used.
Take a host File server with this base config:
address: files.example.comport: 22username: deploy (from its key)route: direct…and a Home override that sets only:
address: 192.168.20.20On Home, the connection resolves to:
address: 192.168.20.20 (override)port: 22 (base)username: deploy (base key)route: direct (base)Anywhere Home does not match, File server connects as its base config says.
In the host editor, each network row shows its status:
| Status | Meaning |
|---|---|
| Inherits base | No override: this network uses the base config |
| Overridden | At least one field is changed on this network |
| Skipped on this network | The host is marked unreachable here |
The row of the network that matches right now carries a Matched now label and a short note on why it matched, for example “on subnet 192.168.20.0/24”.
Security: a new address gets its own host key check
Section titled “Security: a new address gets its own host key check”ZestSSH remembers a server’s host key by the address and port it dialed, and for a host reached through a jump host, also by that route. So when an override changes the address or port, ZestSSH treats it as a different server for the host key check: on the first connection it asks you to trust its key, as for any new server. (On a computer, Settings > Security and privacy > Unknown host keys sets whether new hosts are asked about or trusted without asking. A changed key always stops the connection until you check it.)
192.168.20.20 and files.example.com are two different places as far as the key check is concerned, and each must earn your trust. Check the fingerprint before you accept it. After that, each is remembered on its own, and switching networks does not ask again unless a key really changes. See Host key verification.
How to set one up
Section titled “How to set one up”You can set overrides from the host, on a phone or a computer, or from the network, on a computer.
From the host (phone and computer)
Section titled “From the host (phone and computer)”- Open the host’s editor. On a computer, go to its Network section. On a phone, tap Advanced options. Find the Networks section (“Override how to reach this host from specific networks”).
- At the top is the Base config card, marked Read-only: the address, port, username, key and route every network uses unless it overrides them.
- Below it is one row per network, Default included.
- On the network you want to change, open the row’s mode menu and choose:
- Use base config: take everything from the base (nothing is saved).
- Override: fill in only the fields that differ.
- Mark unreachable from this network: never dial this host on this network.
- For an existing host, use Test as this network on the row to try the resolved settings: Test reachability only opens a connection to the port, Test full connection also signs in. From 4.3 both go through the network’s chain of jump hosts where it differs from the host’s own, as a session on that network would.
- Save the host.
If you have no networks of your own yet, the section says: “No custom networks yet. Add one on the Networks page to route this host differently depending on where you are.”
From the network (computer)
Section titled “From the network (computer)”- Open Networks in the side rail and select the network.
- In Simple mode, Host rules lists the hosts with a rule of their own on this network, each with what is different (“Reached at 192.168.20.20”, “Through bastion”, “Not reached on this network” or “Directly, on this network”). With none, it says “None. Add one to reach a single host differently on this network.”
- Choose Add host rule and pick a host, or Edit on a rule. The editor switches to Advanced, where the rule’s row in Host overrides has Address, Port, a switch to mark the host unreachable on this network, and its jump hosts. In Host overrides you can also use Override to pick a host.
- Choose Save network.
On a phone or tablet, the networks list shows, under each network, the hosts that override it (“Hosts overriding here”); tapping one opens its editor.
Common mistakes
Section titled “Common mistakes”Expecting an empty route to remove the base jump host. A row with no hops chosen uses the host’s own route. To reach the host with no jump host on that network, pick (direct) in Jump via.
Accepting the new host key prompt without looking. A new address is exactly when the key check protects you. Check the fingerprint.
Overriding the username when you meant the key. The username normally comes from the key, so changing the key is often all you need.
Expecting an empty Override row to do something. An override with no fields filled in is the same as using the base, and it is not saved. Fill in at least one field, choose Mark unreachable from this network, or leave the row on Use base config.
Marking a host unreachable and forgetting. If a host will not connect from one place but works everywhere else, check that network’s row.
Free and Squeezed
Section titled “Free and Squeezed”| Capability | Free | Squeezed |
|---|---|---|
| Networks, triggers, address, port, username and key overrides | Yes | Yes |
| Mark a host unreachable on a network | Yes | Yes |
| Jump via in an override | Locked | Yes |
Next steps
Section titled “Next steps”- Triggers and matching: how the network that drives these overrides is chosen.
- Networks: the detect, match and resolve steps.
- Jump hosts: building the routes an override can add or change.
- Port forwarding: forwards and Run on network….