简体   繁体   中英

Reading keys from OpenSSH auth agent on Windows with Paramiko is failing with "[Errno 22] Invalid argument: '\\\\.\\pipe\\openssh-ssh-agent'"

I am using simple function to list out all RSA keys using paramiko.agent.Agent().get_keys() function. But there is weird error:

[Errno 22] Invalid argument: '\\.\pipe\openssh-ssh-agent'

Also OpenSSH server is running

from paramiko import agent

print(agent.Agent().get_keys())

Error message: 在此处输入图像描述

My local version of OpenSSH is:

OpenSSH_for_Windows_8.9p1, LibreSSL 3.4.3

paramiko==2.10.3 is having an issue with connecting to OpenSSH authentication agent on Windows machine.

I upgraded it to paramiko==2.11.1 and it solved my problem. Now this version is not throwing any error like Invalid argument: '\\\\.pipe\\openssh-ssh-agent'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM