Anonymous
Старая проблема SFTP: paramiko.ssh_Exception.SSHException: несовместимый узел ssh (нет приемлемого ключа хоста)
Сообщение
Anonymous » 10 окт 2024, 16:00
Ошибка:
paramiko.ssh_Exception.SSHException: несовместимый узел ssh (нет приемлемого ключа хоста)
Версия Paramiko: 2.8.1 [к сожалению, обновить невозможно]
Журналы отладки:
Код: Выделить всё
DEBUG:paramiko.transport:starting thread (client mode): 0x28252fd0
DEBUG:paramiko.transport:Local version/idstring: SSH-2.0-paramiko_2.8.1
DEBUG:paramiko.transport:Remote version/idstring: SSH-2.0-AWS_SFTP_1.1
INFO:paramiko.transport:Connected (version 2.0, client AWS_SFTP_1.1)
DEBUG:paramiko.transport:kex algos:['ecdh-nistp384-kyber-768r3-sha384-d00@openquantumsafe.org', 'x25519-kyber-512r3-sha256-d00@amazon.com', 'ecdh-nistp256-kyber-512r3-sha256-d00@openquantumsafe.org', 'ecdh-nistp521-kyber-1024r3-sha512-d00@openquantumsafe.org', 'ecdh-sha2-nistp256', 'ecdh-sha2-nistp384', 'ecdh-sha2-nistp521', 'curve25519-sha256', 'curve25519-sha256@libssh.org', 'diffie-hellman-group18-sha512', 'diffie-hellman-group16-sha512', 'diffie-hellman-group-exchange-sha256'] server key:['rsa-sha2-512', 'rsa-sha2-256'] client encrypt:['aes128-gcm@openssh.com', 'aes256-gcm@openssh.com', 'aes128-ctr', 'aes256-ctr', 'aes192-ctr'] server encrypt:['aes128-gcm@openssh.com', 'aes256-gcm@openssh.com', 'aes128-ctr', 'aes256-ctr', 'aes192-ctr'] client mac:['hmac-sha2-256-etm@openssh.com', 'hmac-sha2-512-etm@openssh.com'] server mac:['hmac-sha2-256-etm@openssh.com', 'hmac-sha2-512-etm@openssh.com'] client compress:['none', 'zlib@openssh.com'] server compress:['none', 'zlib@openssh.com'] client lang:[''] server lang:[''] kex follows?False
DEBUG:paramiko.transport:Kex agreed: curve25519-sha256@libssh.org
ERROR:paramiko.transport:Exception: Incompatible ssh peer (no acceptable host key)
Получение закрытого ключа с помощью:
Код: Выделить всё
pkey = Ed25519Key.from_private_key(io.StringIO(private_key_ascii))
с тех пор, как
Код: Выделить всё
pkey = RSAKey.from_private_key(io.StringIO(private_key_ascii))
не работало.
Подробнее здесь:
https://stackoverflow.com/questions/790 ... -peer-no-a
1728565212
Anonymous
Ошибка: paramiko.ssh_Exception.SSHException: несовместимый узел ssh (нет приемлемого ключа хоста) Версия Paramiko: 2.8.1 [к сожалению, обновить невозможно] Журналы отладки: [code]DEBUG:paramiko.transport:starting thread (client mode): 0x28252fd0 DEBUG:paramiko.transport:Local version/idstring: SSH-2.0-paramiko_2.8.1 DEBUG:paramiko.transport:Remote version/idstring: SSH-2.0-AWS_SFTP_1.1 INFO:paramiko.transport:Connected (version 2.0, client AWS_SFTP_1.1) DEBUG:paramiko.transport:kex algos:['ecdh-nistp384-kyber-768r3-sha384-d00@openquantumsafe.org', 'x25519-kyber-512r3-sha256-d00@amazon.com', 'ecdh-nistp256-kyber-512r3-sha256-d00@openquantumsafe.org', 'ecdh-nistp521-kyber-1024r3-sha512-d00@openquantumsafe.org', 'ecdh-sha2-nistp256', 'ecdh-sha2-nistp384', 'ecdh-sha2-nistp521', 'curve25519-sha256', 'curve25519-sha256@libssh.org', 'diffie-hellman-group18-sha512', 'diffie-hellman-group16-sha512', 'diffie-hellman-group-exchange-sha256'] server key:['rsa-sha2-512', 'rsa-sha2-256'] client encrypt:['aes128-gcm@openssh.com', 'aes256-gcm@openssh.com', 'aes128-ctr', 'aes256-ctr', 'aes192-ctr'] server encrypt:['aes128-gcm@openssh.com', 'aes256-gcm@openssh.com', 'aes128-ctr', 'aes256-ctr', 'aes192-ctr'] client mac:['hmac-sha2-256-etm@openssh.com', 'hmac-sha2-512-etm@openssh.com'] server mac:['hmac-sha2-256-etm@openssh.com', 'hmac-sha2-512-etm@openssh.com'] client compress:['none', 'zlib@openssh.com'] server compress:['none', 'zlib@openssh.com'] client lang:[''] server lang:[''] kex follows?False DEBUG:paramiko.transport:Kex agreed: curve25519-sha256@libssh.org ERROR:paramiko.transport:Exception: Incompatible ssh peer (no acceptable host key) [/code] Получение закрытого ключа с помощью: [code]pkey = Ed25519Key.from_private_key(io.StringIO(private_key_ascii)) [/code] с тех пор, как [code]pkey = RSAKey.from_private_key(io.StringIO(private_key_ascii)) [/code] не работало. Подробнее здесь: [url]https://stackoverflow.com/questions/79061761/old-sftp-issue-paramiko-ssh-exception-sshexception-incompatible-ssh-peer-no-a[/url]