Exscript does not return full output

192 Views Asked by At

I have a simple script (below) which should return an output from a simple show command but instead I am getting the one line of the output or no output at all.

>>> from Exscript.protocols import *

>>> conn = SSH2()
>>> conn.connect("192.168.0.1")
>>> conn.login(Account("username", "password"))
>>> conn.send("\r")
>>> conn.response
u'--- JUNOS 13.2R7.5 built 2015-02-12 11:55:28 UTC'
>>> conn.execute("\r")
(0, <_sre.SRE_Match object at 0x7f6bd4707440>)
>>> conn.response
u''
>>> conn.execute("show version")
(0, <_sre.SRE_Match object at 0x7f6bd4707440>)
>>> conn.response
u'\r\n\r\n{master}\r\username@S1> '

Who knows how to fix this problem?

0

There are 0 best solutions below