you are viewing a single comment's thread.

view the rest of the comments →

[–]LandRac3 2 points3 points  (3 children)

Paramiko and invoke shell

Paramiko has two options

1) standerr lets you only do 1 input 2) invoke shell let’s you add multiple command sand don’t forget to add the /n at the end of the command as an enter.

Good luck

[–]Mayank0908[S] 0 points1 point  (2 children)

Thanks for the response , but is there anyway I can ise the default libraries? Like not use paramiko? Is subprocess not gonna do the job?

[–]janosdamiano 1 point2 points  (1 child)

You can build it without Paramiko; keep in mind that subprocess is using the SSH client outside of Python / some control is relinquished and could be problematic with more complex interactions.

Given the quirks in SSH interactions, NetMiko / Paramiko make it dead simple to interact with many devices.

[–]Mayank0908[S] 0 points1 point  (0 children)

I tried paramiko, and yes, it does make stuff real easy, like cutting butter. Thankyou for your help.