Returns a channel according to if there is a redirection to do or
        not.

def _get_channel(self):
        """Returns a channel according to if there is a redirection to do or
        not.
        """
        channel = self._transport.open_session()
        channel.set_combine_stderr(True)
        channel.get_pty()
        return channel