Issue283

Title paramiko not working with nuitka
Priority bug Status chatting
Superseder Nosy List hoangthehung, kayhayen
Assigned To kayhayen Keywords

Created on 2016-01-13.14:23:29 by hoangthehung, last changed by kayhayen.

Messages
msg1789 (view) Author: hoangthehung Date: 2016-01-18.14:23:30
Hi kay
I hope that you will guide step by step to fix it

Thanks
msg1788 (view) Author: kayhayen Date: 2016-01-17.10:26:26
The producing script works with --recurse-all, so I am assuming it's a 
standalone problem. Likely one of the crypto libraries has plugins, but it's 
hard to tell which. However, using strace on pure Python I think, we should be 
able to tell the difference in dlopen, if that holds true.

But before I go there, I want to write some import run time tracing helper that 
I have been thinking about for a while.

Yours,
Kay
msg1787 (view) Author: hoangthehung Date: 2016-01-17.03:50:02
hi hayhayen
How to fix it? Please help me?
msg1772 (view) Author: hoangthehung Date: 2016-01-13.14:23:29
File: main.py

import paramiko
import logging

logging.basicConfig(level=logging.DEBUG)

conversation = paramiko.SSHClient()
ssh_policy = paramiko.AutoAddPolicy()
conversation.set_missing_host_key_policy(ssh_policy)
try:
    conversation.connect("187.115.122.201",
                         port=22,
                         username="admin",
                         password="admin", timeout=5, banner_timeout=7)

except Exception as e:
    print e

+When build with nuitka and run main.exe then output:

DEBUG:paramiko.transport:Kex agreed: diffie-hellman-group1-sha1
DEBUG:paramiko.transport:Cipher agreed: aes128-ctr
DEBUG:paramiko.transport:MAC agreed: hmac-md5
DEBUG:paramiko.transport:Compression agreed: none
DEBUG:paramiko.transport:kex engine KexGroup1 specified hash_algo <built-in 
function openssl_sha1>
DEBUG:paramiko.transport:Switch to new keys ...
DEBUG:paramiko.transport:Adding ssh-rsa host key for 187.115.122.201: 
487f27f44b70ee213d2de8a1e18a818f
argument must be string or read-only buffer, not tuple
DEBUG:paramiko.transport:EOF in transport thread

Error:argument must be string or read-only buffer, not tuple
but run python main.py the output:

DEBUG:paramiko.transport:MAC agreed: hmac-md5
DEBUG:paramiko.transport:Compression agreed: none
DEBUG:paramiko.transport:kex engine KexGroup1 specified hash_algo <built-in 
function openssl_sha1>
DEBUG:paramiko.transport:Switch to new keys ...
DEBUG:paramiko.transport:Adding ssh-rsa host key for 187.115.122.201: 
487f27f44b70ee213d2de8a1e18a818f
DEBUG:paramiko.transport:userauth is OK
INFO:paramiko.transport:Auth banner: 
INFO:paramiko.transport:Authentication (password) successful!
DEBUG:paramiko.transport:EOF in transport thread
History
Date User Action Args
2016-02-01 10:05:34kayhayensetpriority: urgent -> bug
2016-01-18 14:23:30hoangthehungsetmessages: + msg1789
2016-01-17 10:26:26kayhayensetmessages: + msg1788
2016-01-17 03:50:02hoangthehungsetassignedto: kayhayen
messages: + msg1787
nosy: + kayhayen
2016-01-14 16:47:12hoangthehungsetpriority: bug -> urgent
2016-01-13 14:23:41hoangthehungsetstatus: unread -> chatting
2016-01-13 14:23:29hoangthehungcreate