I made a wrapper for Paramiko, which helps me to connect to (mainly Cisco IOS-XR) devices using Linux server as jumphost. So I first SSH to jumphost using Paramiko and from there I jump further using Linux ssh. However, when sending slightly longer commands in Paramiko shell, they get strangely echoes, for example:
if not isinstance(patterns, list):
patterns = [patterns]
while True:
time.sleep(SSH.poll_sleep) # default 0.5s
if self.shell.recv_ready():
found_pattern = None
received = self.shell.recv(8192)
received = received.decode()
if self.doprint:
print(received, end='')
.....`
Do you know what might be causing the issue like that?
Thanks, Dragan
Hi,
I made a wrapper for Paramiko, which helps me to connect to (mainly Cisco IOS-XR) devices using Linux server as jumphost. So I first SSH to jumphost using Paramiko and from there I jump further using Linux ssh. However, when sending slightly longer commands in Paramiko shell, they get strangely echoes, for example:
RP/0/RP0/CPU0:ROUTER#show rpl route-policy TESTING-ROUTING-POLICY deta$NG-ROUTING-POLICY
The command that should have been sent it:
show rpl route-policy TESTING-ROUTING-POLICY detail
Here is the code excerpt that is responsible for receiving data:
` def expect(self, patterns, timeout=0): self.__before.clear() wait = 0
.....`
Do you know what might be causing the issue like that? Thanks, Dragan