# A link between two liminals

Enrol both liminals in Lys, name each to the other, export a subject and prove the open on the health page.

You will join two liminals so that a named subject crosses from one to the other, and prove it on the accepting end's log and the dialling end's health page.

## Before you begin

Both liminals are enrolled as agents in Lys and hold their own passes. You have each one's public key, printed by the identity command.

> warning
> The accepting end admits machines by public key. A peer not named there is refused by name; nothing is admitted on address alone.


## Complete the task


1. On the dialling end, name the peer, its address and the exported subjects.

**liminal.toml on the dialling end**

```toml
[auth.lys.machine]
identity_path = "/var/lib/liminal/liminal-agent.key"
agent_id = "agent-<this liminal>"
audience = "liminal"

[auth.lys.machine.machines]
"agent-<the peer>" = "<the peer's public key, hex>"

[[auth.lys.machine.links]]
link_id = "here-to-peer"
peer_holder = "agent-<the peer>"
peer_address = "10.0.0.2:7610"
exports = ["demo"]
```


2. On the accepting end, admit the dialling liminal by its public key.

**liminal.toml on the accepting end**

```toml
[auth.lys.machine]
identity_path = "/var/lib/liminal/liminal-agent.key"
agent_id = "agent-<the peer>"
audience = "liminal"

[auth.lys.machine.machines]
"agent-<this liminal>" = "<this liminal's public key, hex>"
```


3. Check both files with the new configuration, then restart the accepting end, then the dialling end.

**Terminal**

```bash
liminal check --config liminal.toml
# liminal.toml: configuration valid
```


4. Prove the open: the dialling end's health page shows the link with one open and no refusal. A refused open is logged at both ends with its reason.

**Terminal**

```bash
curl -s http://127.0.0.1:7601/health
```



## If something goes wrong

A refusal named `link_import` means the accepting end would not admit a subject: the exports are not granted to the dialling liminal's pass. A dial the operating system refused is retried on its own. A peer that was shutting down refuses once with `connection links ended: shutdown` and the retry opens.

## Next step

Watch the subject cross on the console, or subscribe to it from a ticket: [Ticket tools and lines](/liminal/reference/ticket-tools/).
