<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def execute_ssh_command(client, cmd):
 """ Execute given command using paramiko. Returns: String output of cmd execution. Raises: IpaSSHException: If stderr returns a non-empty string. """

    try:
        stdin, stdout, stderr = client.exec_command(cmd)
        err = stderr.read()
        out = stdout.read()
        if err:
            raise IpaSSHException(out.decode() + err.decode())
    except:  # noqa: E722
        raise
    return out.decode()