After executing a command by Python Paramiko how could I save result?
问题 As you see below, is it possible to save the result? Cause, at second and third stdout.read() I couldn't reach the result. import paramiko import os dssh = paramiko.SSHClient() dssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) dssh.connect('192.168.1.250', username='root', password='pass') import os stdin, stdout, stderr = dssh.exec_command('ifconfig') print stdout.read() print ('Sleeping 2 seconds!') os.system('sleep 2') stdin, stdout, stderr = dssh.exec_command('ls -l') print