Hello,
I have a simple function that uses SSH via paramiko module. For example, if I have a line:
I would expect stdout to be "0", instead I get:
b'0\n'
<paramiko.ChannelFile from <paramiko.Channel ...... etc>
Is there a simple way for me to only get the "clean" stdout output returned from exec_command? I know I can parse the present output (to obtain only 0 in this particular case), but I believe there must be another solution by paramiko's design. Thank you, JC
I have a simple function that uses SSH via paramiko module. For example, if I have a line:
1 |
stdin, stdout, stderr = client.exec_command( "echo 0" ) |
b'0\n'
<paramiko.ChannelFile from <paramiko.Channel ...... etc>
Is there a simple way for me to only get the "clean" stdout output returned from exec_command? I know I can parse the present output (to obtain only 0 in this particular case), but I believe there must be another solution by paramiko's design. Thank you, JC