---
title: When an SSH alias moves
description: How REM maps devices from local SSH files and keeps context policy tied to the device an owner reviewed.
date: 2026-12-05
tags: [REM, Devices, Context policy]
---

# When an SSH alias moves

In a synthetic REM notebook, `mbp16` was a Host alias in the SSH config and
`parrot.local` was a named entry in `known_hosts`. Both were useful clues.
Neither file said who owned the device, who could reach it, or when it was
last used. The Devices list now shows the SSH source beside the device’s
ownership status, with a route to the policy on the same page.

One option was to ask the SSH client which host each alias resolves to.
That would make discovery depend on settings such as `Match exec`, which can
run a command while SSH reads its config. REM reads literal records instead.
It can match a statically resolved host and port to the same named entry in
`known_hosts`. When conditional or proxy settings make the destination
unclear, the alias stays separate. No SSH connection is made.

The choice matters most when an alias moves. In a regression fixture, an
owner had marked the first `mbp16` device as theirs and later marked its page
lost. The SSH config then pointed `mbp16` at a different host. Discovery kept
the old page and policy and gave the new endpoint its own unclaimed device.
The alias alone could not carry the earlier policy across.

Personal context to a newly discovered device asks first through the same
decision path as an unknown device. The **Mine** control explains what the owner
is choosing. Marking the device as yours lets personal context stay there by
default. The synthetic desktop and phone checks open that Policy section from
the Devices list and verify that the row reflects the owner’s choice.

Use `co rem map devices --dry-run` to preview the rows and policies. See
[how to review a discovered device](https://github.com/openonion/connectonion/blob/v1.9.7rc41/docs/rem-policy.md#review-a-discovered-device).
