from ssh import Ssh # Sample code to test paramiko on a real ssh device using the 'shell' channel myssh = Ssh(ip='10.205.10.120', user='******', password='******', port=10106, debug=False) myssh.connect() myssh.shell_send(['show configuration commands | grep network-emulator']) myssh.shell_read() print(myssh.output) myssh.close()
from ssh import Ssh # Sample code to test paramiko on a real ssh device using the 'shell' channel myssh = Ssh(ip='10.5.0.31', user='******', password='******', port=22, debug=True) myssh.connect() myssh.shell_send(["ps -xww | grep qemu-system-x86\n"]) print(myssh.output) for line in myssh.output.splitlines(): print("\nline={}".format(line)) myssh.close()