rtk-ai/rtk

Feature: SSH command filtering/proxying

Open

#1,680 创建于 2026年5月2日

在 GitHub 查看
 (1 评论) (0 反应) (0 负责人)Rust (2,914 fork)batch import
area:clienhancementhelp wantedpriority:medium

仓库指标

Star
 (48,085 star)
PR 合并指标
 (平均合并 11天 1小时) (30 天内合并 45 个 PR)

描述

Summary

Add RTK support for ssh commands to filter remote output before it enters context.

Use case

When running remote diagnostics via SSH (e.g. ssh user@host "systemctl status ..."), raw output can be large. RTK already handles local equivalents (rtk ps, rtk df, rtk docker) — the same filtering should apply when those run over SSH.

Example

Current (unfiltered)

ssh name@xxx.xxx.x.xxx "systemctl status ollama && ollama ps && nvidia-smi"

Desired

rtk ssh ssh name@xxx.xxx.x.xxx "systemctl status ollama && ollama ps && nvidia-smi"

Privacy/security requirement

Output must be filtered LOCALLY — no credentials, hostnames, IPs, or command output leave the local machine. RTK acts as a local stdout filter on the subprocess return, identical to how it handles local commands today. No telemetry on remote host, command, or content.

Behavior spec

  • rtk ssh spawns ssh as a subprocess (same as rtk ps spawns ps)
  • Stdout filtered/compressed locally before entering context
  • Falls back to raw output if filtering fails
  • Respects existing rtk output size limits

Context

Discovered via rtk discover — 4 SSH calls in one session producing unfiltered remote service/GPU status. Local equivalents filter at 84–96% reduction; same savings expected.

贡献者指南