V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Cyshall
V2EX  ›  程序员

1password wsl2 中的 ssh agent 功能失效

  •  
  •   Cyshall · 190 天前 · 334 次点击
    这是一个创建于 190 天前的主题,其中的信息可能已经有所发展或是发生改变。

    之前一直都是在 windows 中安装 1password 开启 ssh agent 功能,然后 wsl2 中通过 socat 和 windows 下的 npiperelay 配合使用的,最近这几天突然不行了,网上也没啥资料,想问下各位有没有遇到过同样问题。

    问题复现:

    第一个窗口在 wsl2 中执行以下命令:

    /usr/bin/socat UNIX-LISTEN:/root/.ssh/agent.sock,fork EXEC:"/mnt/c/Users/xxxx/AppData/Local/Microsoft/WinGet/Links/npiperelay.exe -ei -s //./pipe/openssh-ssh-agent"
    

    第二个窗口在 wsl2 执行ssh-add -l报错:

    error fetching identities: communication with agent failed
    

    此时回到第一个窗口会输出以下内容:

    /mnt/c/Users/xxxx/AppData/Local/Microsoft/WinGet/Links/npiperelay.exe: 1: MZ    @   : not found
    /mnt/c/Users/xxxx/AppData/Local/Microsoft/WinGet/Links/npiperelay.exe: 3: Syntax error: word unexpected (expecting ")")
    2023/10/31 19:01:56 socat[2906] E waitpid(): child 2907 exited with status 2
    

    系统信息:

    版本	Windows 11 专业版
    版本	22H2
    安装日期	‎2023/‎4/‎10
    操作系统版本	22621.2428
    体验	Windows Feature Experience Pack 1000.22674.1000.0
    

    1password 信息:

    1Password for Windows 8.10.7 (81007041)
    
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5492 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 07:19 · PVG 15:19 · LAX 00:19 · JFK 03:19
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.