Open epuscasu opened 1 year ago
Hi there,
Thanks for the interest and report.
This is a known issue with publickey_fromfile
and ED25519 keys on Windows only. I suspect Window's file locking behaviour is the root cause.
Use userauth_publickey_frommemory
instead to work around.
Use userauth_publickey_frommemory instead to work around.
Does not work, same behavior. Any other suggestions?
Yes, also tested.
I've not found a way to make ED25519
keys work on Windows clients. I'd suggest using ECDSA or any other type of key.
Can also use the high level client pssh.clients.ssh.SSHClient
- documentation here.
Reference https://github.com/ParallelSSH/parallel-ssh/issues/285
ED25519
key files cannot be loaded by neither userauth_publickey_fromfile
nor userauth_publickey_frommemory
on Windows clients only.
Most probably a bug with upstream libssh2. Needs C test case and tracing output to investigate and raise with libssh2.
Hello @pkittenis! Any updates on this issue?
Hello again, @pkittenis
It seems the issue was fixed in the latest version of libssh2. Is there a chance to update libssh2 on this repository as well?
Pending new release of libssh2 that contains the fix.
1.10.0 is so far the latest version and it does not contain the fix.
Bug reports
Steps to reproduce:
Expected behaviour: Successful connection,
(5, b'test\n')
output.Actual behaviour:
ssh2.exceptions.FileError
. Using a RSA key performs as expected.Additional info: ssh2-python version
0.27.0
, Windows 10 x64, Python 3.10.Possible cause - the OpenSSL version bundled with the PyPI packages might be outdated on some platforms. EdDSA support was included in 1.1.1 (https://www.openssl.org/blog/blog/2018/09/11/release111/)