python - Paramiko error "bound method ChannelFile.read of <paramiko.ChannelFile from <paramiko.Channel 0 (open) window=2097152 " -


while running below script, transport error.

#!/usr/bin/python import paramiko print("hello world") ssh=paramiko.sshclient() ssh.set_missing_host_key_policy(paramiko.autoaddpolicy()) ssh.connect('host_ip',username='user',password='passwd') cmd='/usr/lib/qlogic/qmgr-ui' print(cmd) stdin,stdout,stderr=ssh.exec_command(cmd) z=stdout.read print(z) ssh.close() 

error :

<bound method channelfile.read of <paramiko.channelfile <paramiko.channel 0 (open) window=2097152 -> <paramiko.transport @ 0xac44ff28 (cipher aes128-ctr, 128 bits) (active; 1 open channel(s))>>>> 

for other service /usr/lib/qlogic/qmgr, works qmgr-ui service not working. can please me out ?

thanks, nikhil.

the problem "read" statement

should have been: z=stdout.read()


Comments

Popular posts from this blog

IF statement in MySQL trigger -

c++ - What does MSC in "// appease MSC" comments mean? -

javascript - Blogger related post gadget image Resize s72-c [ Need Expert Help ] -