3添加机器,创建会话Add a machine, open a session
如果电脑能通过 SSH 连上目标机器,直接在桌面客户端的「添加机器」向导里选 SSH 安装即可;也可以按下面三步手动安装。
If you can reach the target over SSH, choose SSH install in the desktop client's Add a machine wizard. You can also follow these three steps to add it manually.
1在客户端里点「添加机器」,复制向导生成的一次性安装命令(1 小时内有效)。In the client, click "Add a machine" and copy the generated install command (one-time token, valid for 1 hour).
2到目标机器上执行这条命令完成安装与注册。注册后会生成 16 位设备指纹,保存在 ~/.omt/bootstrap-commit(也可运行 omtc init --bootstrap-only 查看)。Run that command on the target machine to install and register omtc. Its 16-character fingerprint is saved at ~/.omt/bootstrap-commit (or run omtc init --bootstrap-only to print it).
3回到客户端创建会话。首次连接时填入目标机器上的 16 位指纹完成身份核验(类似 SSH 首次连新主机,防止中间人冒充),之后再连无需重复核对。Back in the client, open a session. On first connect, enter the machine's 16-character fingerprint to verify its identity (TOFU, similar to SSH) and prevent man-in-the-middle attacks.
在目标机器上查看指纹:Reading the fingerprint on the target machine:
omtc@build-server
# 在目标机器上执行「添加机器」生成的安装命令,然后查看指纹:on the target machine, run the install command from the client, then check the fingerprint:
$ cat ~/.omt/bootstrap-commit
a3f9 27c1 88b4 0e6d # 16-character device fingerprint
✓ registered — omtc is up and will start on boot
首次连接弹出的信任确认框有三个选项:填入指纹(推荐)、跳过验证(客户端会直接信任第一次收到的公钥,存在中间人风险)、拒绝(默认安全选项)。如果你没动过这台机器,指纹却对不上,请点拒绝并排查原因。The first-connect trust dialog gives three choices: enter the fingerprint (recommended), skip verification (the client trusts the first key it receives, carrying MITM risk), or reject (safe default). If you have not changed the machine and the fingerprint does not match, reject and investigate.