cmux SSH

Lawrence Chen@lawrencecchen

cmux ssh user@remote はリモートマシン用のワークスペースを作成します。画像をリモートのClaude Codeセッションへドラッグすると自動でアップロードされます。ブラウザペインはリモートネットワーク経由でルーティングされるため、localhostがそのまま動きます。~/.ssh/configを使い、切断時には再接続します。

リモート開発の流れ

  1. cmux sshで接続し、cmuxにリモートホスト専用のワークスペースを作らせます。
  2. ターミナルの横にブラウザペインを開き、dev serverがローカルにあるかのようにlocalhost URLを使います。
  3. Claude Code、Codex、OpenCodeなどのエージェントをリモートマシン上で動かし、通知はcmux経由でMacへ戻します。
  4. エージェントにローカルの文脈やテスト用ファイルが必要なときは、ファイルや画像をリモートターミナルへドラッグします。
  • Browser panes route through the remote machine, so localhost:3000 reaches the remote dev server without port forwarding
  • Drag an image into a remote terminal to upload via scp
  • Coding agents on the remote box send notifications to your local sidebar
  • cmux claude-teams and cmux omo work over SSH, spawning teammate panes locally while computation runs remote
  • The sidebar shows connection state and detected listening ports

FAQ

localhostにはssh -Lが必要ですか?

通常は不要です。リモートワークスペース内のブラウザペインはHTTPとWebSocketの通信をリモートマシン経由でルーティングするため、ローカルプレビューURLはリモートホスト基準で解決されます。

既存のSSH設定を使いますか?

はい。cmuxは~/.ssh/configからエイリアス、identity file、proxy設定、host optionを読み取り、その上にcmux固有のルーティングと再接続動作を追加します。

Read the SSH docs →