> For the complete documentation index, see [llms.txt](https://book.bsdcn.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.bsdcn.org/man/man5/remote.5.md).

# remote.5

`remote` — 远程主机描述文件

## 名称

`remote`

## 描述

tip(1) 所知晓的系统及其属性存储在一个 ASCII 文件中，该文件的结构有些类似于 termcap(5) 文件。文件中的每一行提供单个 *system* 的描述。各字段由冒号（`:`）分隔。以反斜杠字符结尾并紧跟换行符的行会在下一行继续。

第一个条目是主机系统的名称。如果一个系统有多个名称，则各名称之间用竖线分隔。系统名称之后是描述字段。字段名后跟 `=` 表示字符串值。字段名后跟 `#` 表示数值。

名为 `tip*` 和 `cu*` 的条目被 tip(1) 和 `tip` 的 cu(1) 接口用作默认条目，使用方式如下。当 `tip` 仅以电话号码方式调用时，它会查找形如 `tip300` 的条目，其中 300 是建立连接所用的数据速率。当使用 `cu` 接口时，则使用形如 `cu300` 的条目。

## 功能

能力（capability）可以是字符串（str）、数字（num）或布尔标志（bool）。字符串能力由 *capability*`=`*value;* 指定，例如 `dv=/dev/harris`。数值能力由 *capability*`#`*value;* 指定，例如 `xa#99`。布尔能力只需列出能力名即可指定。

**`at`** (str) 自动呼叫单元类型。

**`br`** (num) 用于串口通信的数据速率（每秒位数）。使用调制解调器时，与远程调制解调器通信所用的数据速率可能与该速率不同。这是一个十进制数。默认速率为每秒 115200 位。

**`cm`** (str) 发送到远程主机的初始连接消息。例如，如果通过端口选择器访问某台主机，可将其设置为切换到该主机所需的适当序列。

**`cu`** (str) 拨打电话时的呼叫单元。默认与 `dv` 字段相同。

**`di`** (str) 用户请求断开连接时发送到主机的断开消息。

**`du`** (bool) 该主机使用拨号线路。

**`dv`** (str) 为建立连接而打开的 UNIX 设备。如果此文件指向终端线路，tip(1) 会尝试对该设备执行独占打开，以确保一次只有一个用户能访问该端口。

**`el`** (str) 标记行尾的字符。默认为 `NULL`。`~` 转义只有在 `el` 中的某个字符之后或回车之后才会被 `tip` 识别。

**`fs`** (str) 传输的帧大小。默认帧大小等于 `BUFSIZ`。

**`hd`** (bool) 主机使用半双工通信，应执行本地回显。

**`ie`** (str) 输入文件结束标记。默认为 `NULL`。

**`oe`** (str) 输出文件结束字符串。默认为 `NULL`。当 `tip` 传输文件时，此字符串会在文件结束时发送。

**`pa`** (str) 向主机发送数据时使用的奇偶校验类型。可以是 `even`、`odd`、`none`、`zero`（始终将第 8 位设置为零）、`one`（始终将第 8 位设置为 1）之一。默认为偶校验。

**`pn`** (str) 该主机的电话号码。如果电话号码字段包含 @ 符号，`tip` 会搜索 **/etc/phones** 文件以获取电话号码列表（参见 [phones(5)](/man/man5/phones.5.md)）。

**`tc`** (str) 表示能力列表在指定名称的描述中继续。主要用于共享公共能力信息。

## 文件

**/etc/remote** — `tip` 主机描述文件位于 **/etc** 中。

## 实例

以下是一个简短的示例，展示了能力续接功能的使用。它在第一个串口上定义了一个 56k 调制解调器连接，速率为每秒 115200 位，无奇偶校验，使用 Hayes 命令集，并采用标准的行编辑和文件结束字符。arpavax 条目包含了 UNIX-57600 条目中的所有内容，外加 arpavax 的电话号码（在此例中为 @ 字符，以便从环境中获取）。

```sh
UNIX-57600:e
:dv=/dev/cuau0:el=^D^U^C^S^Q^O@:oe=^D:du:at=hayes:br#115200:pa=none:
arpavax|ax:e
:pn=e@:tc=UNIX-57600
```

## 参见

cu(1), tip(1), [phones(5)](/man/man5/phones.5.md)

## 历史

`tip` 文件格式出现于 4.2BSD。

## 缺陷

tip(1) 实用程序使用自己对串口数据速率的认知，而非串口的系统默认值。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://book.bsdcn.org/man/man5/remote.5.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
