I am using paramiko for ssh interfactive shell for switches.
Below is the sample example code (Note complete code):
remote_conn.send("\n")
remote_conn.send("show version")
# Wait for the command to complete
#time.sleep(1)
remote_conn.send("\n")
remote_conn.send("show interface brief")
# Wait for the command to complete
time.sleep(3)
if remote_conn.recv_ready():
sp_detail = remote_conn.recv(5000)
print(sp_detail)
recv command print both show version output and show interface brief.
How do i get only show interface brief output to variable sp_detail
I referred below link and used if statement same way they used but still i am getting all the commands output.
Please help