open() passed netOrk's key file to paramiko as key_filename. paramiko then tries it as every key type and keeps only the last error, so a host refusing an RSA or ECDSA key surfaced as "encountered RSA key, expected OPENSSH key" instead of "Authentication failed.".
The key is now loaded once with its own type (PKey.from_path) and passed as pkey=, like netOrk's own SSH sessions since NetOrk/netork#2480. An unreadable key file raises ConnectionException before anything is dialled.
Tested against an in-process SSH server on loopback with RSA, ECDSA and Ed25519 keys, refused and accepted.
open() passed netOrk's key file to paramiko as `key_filename`. paramiko then tries it as every key type and keeps only the last error, so a host refusing an RSA or ECDSA key surfaced as "encountered RSA key, expected OPENSSH key" instead of "Authentication failed.".
The key is now loaded once with its own type (`PKey.from_path`) and passed as `pkey=`, like netOrk's own SSH sessions since NetOrk/netork#2480. An unreadable key file raises `ConnectionException` before anything is dialled.
Tested against an in-process SSH server on loopback with RSA, ECDSA and Ed25519 keys, refused and accepted.
Part of NetOrk/netork#2512.
open() handed the key file netOrk passes in key_file to paramiko as
key_filename. For a key file, SSHClient._auth tries the key as every key
type and keeps only the last error, so a host turning down an RSA or ECDSA
key raised "SSH to <host> failed: encountered RSA key, expected OPENSSH
key" instead of "Authentication failed.", which pointed at the key rather
than at the host that refused it. Ed25519 keys were not affected: they are
the last type tried.
The key is now loaded once with its own type (PKey.from_path) and passed
as pkey=, as netOrk's own SSH sessions do since NetOrk/netork#2480. A key
file that cannot be read raises ConnectionException before anything is
dialled.
Tested against an in-process SSH server on loopback, with RSA, ECDSA and
Ed25519 keys refused and accepted.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
open() passed netOrk's key file to paramiko as
key_filename. paramiko then tries it as every key type and keeps only the last error, so a host refusing an RSA or ECDSA key surfaced as "encountered RSA key, expected OPENSSH key" instead of "Authentication failed.".The key is now loaded once with its own type (
PKey.from_path) and passed aspkey=, like netOrk's own SSH sessions since NetOrk/netork#2480. An unreadable key file raisesConnectionExceptionbefore anything is dialled.Tested against an in-process SSH server on loopback with RSA, ECDSA and Ed25519 keys, refused and accepted.
Part of NetOrk/netork#2512.