我正在使用 Fleet 版本 1.38.89 连接到远程 SSH 开发环境。虽然通过终端访问 SSH 环境工作正常 (
ssh <environment>
),但 Fleet 无法建立连接。日志显示以下错误:
[20240810 06:53:00.663 ERROR FR@SUPERVISOR fleet.ssh.frontend.SshSupervisor] Unknown SSH error
java.io.StreamCorruptedException: Incorrect identification (line too long): at line 8: PATH='/opt/homebrew/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bo
at [email protected]/org.apache.sshd.common.session.helpers.SessionHelper.doReadIdentification(SessionHelper.java:913)
at [email protected]/org.apache.sshd.client.session.AbstractClientSession.readIdentification(AbstractClientSession.java:525)
at [email protected]/org.apache.sshd.common.session.helpers.AbstractSession.messageReceived(AbstractSession.java:499)
at [email protected]/org.apache.sshd.common.session.helpers.AbstractSessionIoHandler.messageReceived(AbstractSessionIoHandler.java:64)
at fleet.plugins.ssh.frontend/fleet.ssh.frontend.mina.proxycommand.ProxyCommandSession.reader(ProxyCommandSession.kt:62)
at fleet.plugins.ssh.frontend/fleet.ssh.frontend.mina.proxycommand.ProxyCommandSession.access$reader(ProxyCommandSession.kt:25)
at fleet.plugins.ssh.frontend/fleet.ssh.frontend.mina.proxycommand.ProxyCommandSession$reader$1.invokeSuspend(ProxyCommandSession.kt)
at fleet.kotlin.runtime/kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at fleet.kotlin.runtime/kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
at fleet.kotlin.runtime/kotlinx.coroutines.internal.SoftLimitedDispatcher$Worker.run(SoftLimitedDispatcher.kt:125)
at fleet.kotlin.runtime/kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)
at fleet.kotlin.runtime/kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:608)
at fleet.kotlin.runtime/kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:873)
at fleet.kotlin.runtime/kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:763)
at fleet.kotlin.runtime/kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:750)
[20240810 06:53:02.418 ERROR ??@?? f.s.f.m.p.ProxyCommandUtils] ProxyCommand '/opt/homebrew/bin/coder --global-config "/Users/<username>/Library/Application Support/coderv2" ssh --stdio <environment>' killed forcefully
[20240810 06:53:03.167 ERROR ??@?? f.s.f.m.p.ProxyCommandUtils] ProxyCommand '/opt/homebrew/bin/coder --global-config "/Users/<username>/Library/Application Support/coderv2" ssh --stdio <environment>' killed forcefully
Fleet 似乎在读取 SSH 标识或
ProxyCommand
时遇到问题。有没有人遇到过类似的问题或者可以建议可能出了什么问题?
附加信息:
有什么可能的解决方法可以让 Fleet 连接到 SSH,也许可以通过调整 macOS SSH 配置或进行其他更改?如果这是 Fleet 中的错误,可能需要一些时间才能修复,同时我需要一个解决方案来继续在 SSH 环境中工作。任何建议将不胜感激。
更新:
这是我用于 Fleet 的主机:
coder.my-workspace.main
Host coder.my-workspace.main
HostName coder.my-workspace.main
MaxIdentificationLength 2048
ConnectTimeout=30
StrictHostKeyChecking=no
UserKnownHostsFile=/dev/null
LogLevel ERROR
ProxyCommand /opt/homebrew/bin/coder --global-config "/Users/me/Library/Application Support/coderv2" ssh --stdio my-workspace.main