dsh-remote-sudo
Ask for a sudo password in the DSH composer and run remote root commands over SSH without putting the password in the transcript. 适合通过SSH执行远程sudo命令的用户;密码在输入面板填写,不写入对话记录,需先配置密钥登录。
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:seudut/dsh-remote-sudoREADME
Read the full README ↗配置
config:
passwordTtlMs: 0 # 0 = 每次都要密码;正整数 = 内存缓存毫秒数
| 键 | 默认 | 说明 |
|---|---|---|
passwordTtlMs | 0 | 0 = 每次都要密码;正整数 = 密码在宿主内存保留的毫秒数 |
使用
让 agent 调用 remote_sudo:
用
remote_sudo在 aliyun 上执行apt-get update
| 参数 | 必填 | 说明 |
|---|---|---|
host | 是 | ~/.ssh/config 别名 |
command | 是 | 远端 root 命令 |
description | 否 | 面板里的短标签 |
需要密码时弹面板;passwordTtlMs 内不重复弹;取消/停止会结束调用。
Configuration
config:
passwordTtlMs: 0 # 0 = ask every call; positive = in-memory TTL in ms
| Key | Default | Meaning |
|---|---|---|
passwordTtlMs | 0 | 0 asks every call; a positive value is the in-memory password TTL in milliseconds |
Usage
Ask the agent to call remote_sudo:
Use
remote_sudoto runapt-get updateon aliyun
| Argument | Required | Meaning |
|---|---|---|
host | yes | SSH alias from ~/.ssh/config |
command | yes | root command to run remotely |
description | no | short label shown in the panel |
The panel appears when a password is needed; within passwordTtlMs it does not ask again. Cancel/stop ends the call.