Windows 11环境下Cygwin ssh-pageant与PuTTY 0.80联动失败,提示“unable to connect to pipe, error: 3”的排查求助
Windows 11环境下Cygwin ssh-pageant与PuTTY 0.80联动失败,提示“unable to connect to pipe, error: 3”的排查求助
大家好,我现在碰到一个头疼的问题:在全新的Windows 11系统上,用Cygwin自带的ssh-pageant 1.4版本,没法和PuTTY 0.80配合工作,ssh客户端一直报错 "unable to connect to pipe, error: 3"。
先跟大家说下我已经验证过的情况:
- 我在Cygwin shell里直接用plink(PuTTY的命令行ssh工具)可以正常登录远程服务器,这说明两个关键点:
- PuTTY Pageant确实在正常运行
- Pageant里的公钥已经被远程服务器接受
接下来是我在同一个Cygwin shell里执行ssh-pageant的操作和输出:
$ eval $(/usr/bin/ssh-pageant -q) $ env | grep SSH_ SSH_AUTH_SOCK=/tmp/ssh-8x2cLh/agent.127 SSH_PAGEANT_PID=128 $ ls -l $SSH_AUTH_SOCK srw------- 1 thierry thierry 0 Jan 28 00:49 /tmp/ssh-8x2cLh/agent.127 $ ps PID PPID PGID WINPID TTY UID STIME COMMAND 133 28 133 9856 pty0 197609 00:49:50 /usr/bin/ps 27 1 27 17320 ? 197609 23:54:44 /usr/bin/mintty 128 1 128 7056 ? 197609 00:49:16 /usr/bin/ssh-pageant 28 27 28 12312 pty0 197609 23:54:44 /usr/bin/bash
之后我尝试用Cygwin自带的ssh命令登录远程服务器vmiubuntu,开启了详细调试日志,关键错误片段如下:
$ ssh -vvv vmiubuntu OpenSSH_for_Windows_8.6p1, LibreSSL 3.4.3 debug1: Reading configuration data C:\\Users\\thierry/.ssh/config ... debug1: Found key in C:\\Users\\thierry/.ssh/known_hosts:5 debug3: send packet: type 21 debug2: set_newkeys: mode 1 debug1: rekey out after 134217728 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug3: receive packet: type 21 debug1: SSH2_MSG_NEWKEYS received debug2: set_newkeys: mode 0 debug1: rekey in after 134217728 blocks debug3: unable to connect to pipe /tmp/ssh-8x2cLh/agent.127, error: 3 debug1: pubkey_prepare: ssh_get_authentication_socket: No such file or directory ... thierry@vmiubuntu's password:
补充个重要信息:这套配置在旧的Windows 10系统上完全正常,同样是最新版的Cygwin和ssh-pageant,当时用的PuTTY版本是0.79。
有没有大佬能指点一下,我该怎么进一步排查这个问题?
备注:内容来源于stack exchange,提问作者Thierry Lelegard
相关产品推荐
相关产品推荐

