Command executed with Paramiko does not produce any output

If you get no output on stdout, it is usually because the command fails to start.

Read stderr to check for any errors.

print(stderr.readlines())

Quite often the error is “<command> not found”. For that see
Some Unix commands fail with “<command> not found”, when executed using Python Paramiko exec_command


If you are connecting to a device, see also Executing command using Paramiko exec_command on device is not working.

Leave a Comment