[Bug]: `Match exec "step ssh check-host %h"` causes SSH connections through ProxyJump to hang

未关闭 适合新手
#1,734 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
74/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
go
领域
cli, networking

调研方向

首先检查用于构建 Step 的 Go 版本,并将其与 Go issue #80979 中引用的修复进行比较;报告称 Step 0.31.0 内置 Go 1.27.1,升级到 1.27.2 应该可以解决挂起问题。在 Windows 11 上使用 ProxyJump 和 Match exec "step ssh check-host %h" 重现问题,然后确认应用修复后 SSH 可以连接。

由索引模型根据 Issue 内容生成。

描述

bug needs triage
Steps to Reproduce

SSH hangs when the connection involves both ProxyJump and step ssh check-host.

Using an otherwise working ProxyJump configuration:

  • Without any Step invocation during SSH startup, the connection succeeds.
  • Adding only the following block causes it to fail:
Match exec "step ssh check-host %h"
    ServerAliveInterval 60

The failing nested SSH connection logs:

debug3: write ERROR from cb(2):87
debug2: channel 0: write failed

This reproduces without using step ssh proxycommand, isolating the trigger to executing check-host.

We suspect Go #80979. Step 0.31.0 embeds Go 1.27.1, before the relevant fix. We have not yet verified a rebuilt Step binary containing that fix. The issue described in that patch involves Windows pipes, which explains why both ProxyJump and step ssh check-host are required for the issue

Some other notes:

  • Direct connections appear fine (i.e., ProxyJump is required to reproduce)
  • We know that at least Step 0.31.0 is affected
  • Downgrading to Step 0.28.7 resolves the issue (with the same config)
  • We haven't identified the first affected version, but the Go issue notes a regression between Go 1.24.6 and 1.26.0

Full example:

Host jumphost
    HostName jumphost.example.com

Host targethost
    HostName targethost.example.com
    ProxyJump jumphost

Match exec "step ssh check-host %h"
    ServerAliveInterval 60

Summary: Bump to Go 1.27.2 should solve this issue.

Your Environment

Windows 11
Step 0.31.0

Expected Behavior

SSH works

Actual Behavior

SSH hangs

Additional Context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

主要语言
Go
星标
4.3k
派生
320
平均合并
2 天 3 小时
30 天内合并 PR
11

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

smallstep/cli 的其他 Issue

查看 smallstep/cli 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。