Skip to content

feat(devices): rex 専用 SSH alias を devices.conf に追加する (#207) - #208

Merged
rebuildup merged 1 commit into
release/rex-remotefrom
207
Nov 21, 2026
Merged

rebuildup merged 1 commit into
release/rex-remotefrom
207

Conversation

@rebuildup

@rebuildup rebuildup commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • device-* は ClearAllForwardings yes で hardening されており、rex CLI の ssh:// endpoint が使う ssh -L streamlocal 転送が消去されて timeout していた
  • 同一 Infisical /devices 由来の rex-<id> alias を devices.conf に併記生成。HostKeyAlias device-<id> で既存の検証済み host key を共有し、接続情報の二重管理を避ける
  • 実機確認: rex -S device-wsl server status / new / run / capture が Mac CLI から WSL rex server に対して動作

Test plan

  • bun test script/devices.test.ts 12 pass
  • bun script/devices.ts sync で devices.conf 再生成(rex-* alias 出力確認)
  • Mac→WSL rex -S remote session 作成・コマンド実行・capture 取得

Generated with Devin

Summary by CodeRabbit

  • New Features
    • Each device now has two SSH aliases: the existing alias continues to disable forwarding, while the new rex- alias allows it. Both use the same connection settings and host-key alias.

device-* は ClearAllForwardings yes で hardening されているため、
rex CLI の ssh:// endpoint が使う -L streamlocal 転送が成立せず
timeout していた。接続情報を複製せず同一 Infisical /devices 由来の
rex-<id> alias を生成し、HostKeyAlias で既存の host key 検証を共有する。

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

Walkthrough

renderSSH now emits device-<id> and rex-<id> aliases for each device. Both use the same host-key alias and connection settings. Only the device-* alias includes ClearAllForwardings yes.

Changes: SSH alias generation

Layer / File(s) Summary
Render device and Rex aliases
script/devices.ts
sshBlock renders shared SSH settings for a supplied alias. renderSSH creates device-* and rex-* aliases for each device. The device-* alias includes ClearAllForwardings yes; the rex-* alias omits it. Both retain ProxyCommand none.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Possibly related issues

  • Issue 207 describes ClearAllForwardings blocking the SSH forwarding needed by Rex remote hosts. This change adds a Rex alias that omits that directive.
  • Issue 199 asks about reaching a Rex server through SSH. The change supports the reported device-wsl Rex use case, but does not address the issue’s full research scope.
  • Issue 78 covers the Infisical-to-SSH connection path and pinned host keys. This change uses the same device data and host-key alias behavior, but does not cover Herdr session sharing.

Possibly related PRs

  • rebuildup/dotfiles#79: It introduces the device sync flow and generated device-* SSH configuration that this change extends with rex-* aliases.
Merge Risk: Low · up to b887b

The new rex aliases work by default. They can still lose their forwarding if a user's own SSH config sets ClearAllForwardings yes for all hosts. Emitting an explicit "no" for rex aliases is a small fix that closes this gap.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@rebuildup
rebuildup merged commit c13aaa6 into release/rex-remote Nov 21, 2026
3 of 4 checks passed
@rebuildup
rebuildup deleted the 207 branch November 23, 2026 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant