code: def exec_command(self, command, bufsize=-1, check_status=True):
          
          channel = self.transport.open_session()
  
          if self.forward_agent:
              AgentRequestHandler(channel)
          if self.sudoable:
              channel.get_pty()
  
          channel.exec_command(command)
          if check_status and channel.recv_exit_status() != 0:
              raise RuntimeError("Command execution error: {}".format(command))
  
          stdin = channel.makefile('wb', bufsize)
          stdout = channel.makefile('rb', bufsize)
          stderr = channel.makefile_stderr('rb', bufsize)
          return (stdin, stdout, stderr)
docs: Execute a command on the SSH server while preserving underling
          agent forwarding and sudo privileges.
          https://github.com/paramiko/paramiko/blob/1.8/paramiko/client.py#L348
  
          :param command: the command to execute
          :type command: str
          :param bufsize: interpreted the same way as by the built-in C{file()} function in python
          :type bufsize: int
          :param check_staus: if enabled, waits for the command to complete and return an exception
          if the status is non-zero.
          :type check_staus: bool
          :returns the stdin, stdout, and stderr of the executing command
          :rtype: tuple(L{ChannelFile}, L{ChannelFile}, L{ChannelFile})
  
          :raises SSHException: if the server fails to execute the command