# 宝塔云安全监控-常用命令/重置密码

### 宝塔开心版官网 <https://www.BTKaiXin.com> <a href="#install" id="install"></a>

### ✈️宝塔站长群 <https://qun.BTKaiXin.com> <a href="#install" id="install"></a>

### **安装云安全监控**

#### <mark style="color:purple;">Ubuntu/Debian/CentOS最新版安装脚本，详见宝塔开心版主页</mark> [<mark style="color:purple;">https://www.btkaixin.net/</mark>](https://www.btkaixin.net/)

***

### **命令行工具**

主控命令行工具箱

```
btm
```

> \==================云安全监控命令行======================
>
> 1\) 重启主控服务       2) 查看登录地址及安全入口
>
> 3\) 停止主控服务     4) 查看运行状态
>
> 5\) 查看错误日志     6) 修改管理员密码(自动生成随机密码)
>
> 7\) 关闭basic\_auth **8) 修改管理员密码(手动输入密码)**
>
> 9\) 取消域名绑定     10) 修改安全入口(手动输入)
>
> 11\) 取消IP绑定限制 12) 修改端口(手动输入)
>
> **13) 修复主控(检查错误并更新云安全监控到最新版)**
>
> 14\) 无法访问?(云安全监控故障检测自动修复程序-超强力版)
>
> 15\) 关闭动态口令认证
>
> 0\) 退出或按组合键\[ctrl+c]
>
> \======================================================
>
> 请输入对应数字进行命令行操作\[0-15]:8
>
> 按回车键下一步，即可修改管理员密码(手动输入密码)

#### **找回密码/修改面板密码** <a href="#reset-password" id="reset-password"></a>

使用Toot登录SSH命令行输入 **`btm 8`**，（btm和8之间有个空格）即可重制密码。

* 如遇云控异常、报错、无法登陆、忘记密码等情况，请通过SSH登陆root账号，然后输&#x5165;**`btm`**&#x547D;令，根据云安全监控命令行的提示修改相关项目，清理缓存、重启主控；
* 如果输入 **`btm`** 或 **`btm default`** 命令无效，可以尝试 **`bt 13`**&#x4FEE;复主控，或重新安装宝塔云控。

查看主控访问地址

```
btm default
```

修改主控管理员密码

```
btm 8
```

修改主控安全入口

```
btm 10
```

修改主控端口

```
btm 12
```

修复主控

```
btm 13
```

***

### **被控命令行**

启动被控

```
btmonitoragent start
```

停止被控

```
btmonitoragent stop
```

查看被控日志

```
tail -n200 /usr/local/btmonitoragent/logs/logs.log
```

***

### **卸载云安全监控** <a href="#xie-zai-yun-an-quan-jian-kong" id="xie-zai-yun-an-quan-jian-kong"></a>

```
wget http://www.btkaixin.net/install/install_btmonitor.sh && bash install_btmonitor.sh uninstall
```

卸载Linux被控

```
wget http://www.btkaixin.net/install/btmonitoragent.sh && bash btmonitoragent.sh uninstall
```

卸载Windows被控，使用cmd执行命令，删除服务，最后进入C盘手动删除 btmonitoragent 目录

```
cd C:\btmonitoragent
nssm.exe remove BT-MonitorAgent confirm
```

### 宝塔顶尖站长群 <https://qun.BTKaiXin.com> <a href="#install" id="install"></a>

End.


---

# 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://docs.btkaixin.com/bt_cloud_monitor/btmcode.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.
