Redmi AX6000 (miwifi RB06) 1.0.67 一键开启 root SSH:SSH 密码 = Web 后台管理密码,重启后自动恢复 | One-click root SSH for Redmi AX6000 (RB06 1.0.67) with reboot persistence.
一键为 Redmi 路由器 AX6000(miwifi RB06)1.0.67 开启 root SSH。
SSH 密码 = Web 后台管理密码,重启后自动恢复。
One-click root SSH for Redmi Router AX6000 (miwifi RB06) 1.0.67.
The SSH password equals the web admin password, and SSH is restored automatically after reboot.
redmi_wifi_ssh.py 是一个跨平台 Python 脚本:输入路由器 IP 和后台管理密码,即可为 Redmi AX6000(RB06)1.0.67 开启 root SSH。
uid=0(root)),并做过真实重启验证。| 项目 | 内容 |
|---|---|
| 设备 | Redmi 路由器 AX6000(型号 RB06 / 小米固件 miwifi_rb06) |
| 固件 | 1.0.67 |
| 固件下载 | https://cdn.cnbj1.fds.api.mi-img.com/xiaoqiang/rom/rb06/miwifi_rb06_firmware_de54d_1.0.67.bin |
| 固件 MD5 | 9adc67d8b5bd6dce8bff80cc0b5de54d |
stok(兼容 newEncryptMode=1 的 SHA-256 流程和旧版 SHA-1 流程)。name 命令注入(CVE-2023-26319 类)执行 root 命令。/data/xq_ssh/boot.sh + /etc/config/firewall 的 include 钩子。/data),重启后客户端不会反复提示 host key 变化。sshpass 时)并检查持久化配置。/api/xqsystem/login 登录,取得 stok。/api/xqsmarthome/request_smartcontroller 创建并启动场景,在场景 name 中注入 $(command),以 root 执行命令。/data/xq_ssh/boot.sh,并立即执行一次。/etc/config/firewall 注册 include 钩子,每次开机以 root 执行该脚本。boot.sh 每次开机重设 root 密码哈希、恢复 host key、patch dropbear 的 release 渠道检查,并启动 dropbear。RB06 1.0.67 的
/etc是 ramfs(重启即丢),所以密码哈希和 init 脚本修改必须由/data中的开机脚本在每次启动时重新应用。
0.0.0.0 上启动 HTTP 服务,供路由器下载配置脚本。
sshpass(Linux/macOS),用于自动验证密码登录。Windows 默认没有 sshpass,脚本会只检查 22 端口并给出手动连接命令。# 两个位置参数:IP + 后台密码
python3 redmi_wifi_ssh.py <路由器IP> '<后台管理密码>'
# 或用 --password
python3 redmi_wifi_ssh.py <路由器IP> --password '<后台管理密码>'
# 不传密码则交互输入
python3 redmi_wifi_ssh.py <路由器IP>
示例:
python3 redmi_wifi_ssh.py 192.168.31.1 'my-password'
python3 redmi_wifi_ssh.py 10.0.0.142 --password 'my-password'
python3 redmi_wifi_ssh.py 10.0.0.142 --no-verify
成功后的最后两行输出:
ssh -o HostKeyAlgorithms=+ssh-rsa root@<路由器IP>
# 以上为 SSH 连接命令,SSH 密码 = Web 后台管理密码
| 参数 | 说明 |
|---|---|
ip | 路由器管理地址(必填,位置参数 1) |
password_pos | 后台管理密码(位置参数 2,可省略) |
--password | 后台管理密码(与位置参数 2 二选一) |
--user | SSH 用户名,默认 root |
--port | SSH 端口,默认 22 |
--no-verify | 只检查 22 端口,不自动验证密码登录 |
--listen-ip | 本机用于让路由器下载脚本的 IP(默认自动探测) |
现代 OpenSSH 默认禁用 ssh-rsa 主机密钥,连接时需要显式允许:
ssh -o HostKeyAlgorithms=+ssh-rsa root@<路由器IP>
密码 = Web 后台管理密码。
也可以写入 ~/.ssh/config:
Host <路由器IP>
HostKeyAlgorithms +ssh-rsa
然后直接:
ssh root@<路由器IP>
/data/xq_ssh/boot.sh(UBI,重启不丢)。/etc/config/firewall 中的 firewall.xq_ssh include(/etc/config 在 UBI 上)。/data/xq_ssh/dropbear_rsa_host_key。uid=0(root),host key 不变。ssh root@<路由器IP> "/sbin/uci delete firewall.xq_ssh; /sbin/uci commit firewall; killall dropbear; rm -rf /data/xq_ssh"
/data 或防火墙配置被重置,重新运行脚本即可。本项目仅用于合法的安全研究、教学和已授权设备的测试。请勿用于未经授权的设备或网络。使用者需自行承担因使用本工具产生的一切后果,作者不承担任何责任。
redmi_wifi_ssh.py is a cross-platform Python script that enables root SSH on a Redmi AX6000 (RB06) running firmware 1.0.67. Pass the router IP and the web admin password; the script does the rest.
uid=0(root)) on a real RB06 1.0.67 and validated across a real reboot.| Item | Value |
|---|---|
| Device | Redmi Router AX6000 (model RB06 / Xiaomi firmware miwifi_rb06) |
| Firmware | 1.0.67 |
| Firmware download | https://cdn.cnbj1.fds.api.mi-img.com/xiaoqiang/rom/rb06/miwifi_rb06_firmware_de54d_1.0.67.bin |
| Firmware MD5 | 9adc67d8b5bd6dce8bff80cc0b5de54d |
stok (supports both newEncryptMode=1 SHA-256 and legacy SHA-1 flows).name command injection (CVE-2023-26319 class)./data/xq_ssh/boot.sh plus a /etc/config/firewall include hook./data).sshpass is available) and checks the persistence configuration./api/xqsystem/login to obtain a stok./api/xqsmarthome/request_smartcontroller, injecting $(command) into the scene name, which is executed as root./data/xq_ssh/boot.sh and runs it immediately.boot.sh resets the root password hash, restores the host key, patches the dropbear release-channel check, and starts dropbear.On RB06 1.0.67,
/etcis a ramfs and is lost on reboot. The password hash and init-script patch must therefore be re-applied on every boot by a script stored in/data.
0.0.0.0.
sshpass (Linux/macOS) for automated password verification. Windows does not have sshpass by default; the script will only check port 22 and print the manual SSH command.# Two positional arguments: IP + admin password
python3 redmi_wifi_ssh.py <router-ip> '<admin-password>'
# Or with --password
python3 redmi_wifi_ssh.py <router-ip> --password '<admin-password>'
# Omit the password to be prompted
python3 redmi_wifi_ssh.py <router-ip>
Examples:
python3 redmi_wifi_ssh.py 192.168.31.1 'my-password'
python3 redmi_wifi_ssh.py 10.0.0.142 --password 'my-password'
python3 redmi_wifi_ssh.py 10.0.0.142 --no-verify
The final two lines of a successful run are:
ssh -o HostKeyAlgorithms=+ssh-rsa root@<router-ip>
# 以上为 SSH 连接命令,SSH 密码 = Web 后台管理密码
The second line is Chinese and means: “The line above is the SSH command; the SSH password is the web admin password.”
| Parameter | Description |
|---|---|
ip | Router management IP (required, positional 1) |
password_pos | Web admin password (positional 2, optional) |
--password | Web admin password (alternative to positional 2) |
--user | SSH username, default root |
--port | SSH port, default 22 |
--no-verify | Only check port 22; skip automated password verification |
--listen-ip | Local IP the router should use to download the setup script (auto-detected by default) |
Modern OpenSSH disables the ssh-rsa host key algorithm by default. Enable it explicitly:
ssh -o HostKeyAlgorithms=+ssh-rsa root@<router-ip>
The password is the web admin password.
Alternatively, add this to ~/.ssh/config: