# 2. 配置口令

本部分包括以下内容：

* 配置控制台口令
* 配置远程登录口令
* 配置特权口令

口令（密码）可用于防范非法人员登录到交换机或路由器上修改设备的配置。

我们可以在几个不同位置设置口令，以达到多重保护的目的。

## 控制台口令：

当我们从连接在Console口的控制台登录设备时，需要输入控制台口令。由于控制台是一种本地配置方式，所以不设置这个口令影响也不大。

## 远程登录口令：

当我们从网络中的计算机通过Telnet命令登录设备时，需要输入远程登录口令。远程登录是一种远程配置方式，这个口令应该设置。在锐捷设备中，没有设置远程登录口令的设备是不能用Telnet命令登录的。

## 特权口令：

当我们登录设备后，从用户模式进入特权模式，需要输入特权口令。由于特权模式是进入各种配置模式的必经之路，在这里设置口令可有效防范非法人员对设备配置的修改。在锐捷设备中，特权模式可设置多个级别，每个级别可设置不同的口令和操作权限，你可以根据情况让不同人员使用不同的级别。在锐捷设备中，没有设置特权口令的设备也不能用Telnet命令登录。

在实际应用中，一般特权口令和远程登录口令是必需的，设置的口令不应该太简单，不同位置的口令也不应该相同。


---

# Agent Instructions: 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:

```
GET https://kerwin.gitbook.io/ruijie/jiao-huan-chan-pin/path2/2.-pei-zhi-kou-ling.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
