class_docstr: Representation of an SSH connection.
      
class_docstr_tok: ["Representation","of","an","SSH","connection","."]
code: def _exec_ssh(
      self, ssh_cmd, cmd, options=None, stdin=None, log_output=True
  ):
      cmd = self._adjust_cmd_for_bundle_execution(cmd)
  
      for opt in options or []:
          ssh_cmd.extend(["-o", opt])
  
      # build SSH call, feed remote command as a single last argument
      # whatever it contains will go to the remote machine for execution
      # we cannot perform any sort of escaping, because it will limit
      # what we can do on the remote, e.g. concatenate commands with '&&'
      ssh_cmd += [self.sshri.as_str()] + [cmd]
  
      lgr.debug("%s is used to run %s", self, ssh_cmd)
  
      # TODO: pass expect parameters from above?
      # Hard to explain to toplevel users ... So for now, just set True
      out = self.runner.run(
          ssh_cmd,
          protocol=StdOutErrCapture if log_output else NoCapture,
          stdin=stdin,
      )
      return out["stdout"], out["stderr"]
  
imports: import fasteners
  import os
  import logging
  from socket import gethostname
  from hashlib import md5
  from subprocess import Popen
  import tempfile
  import threading
  from datalad.utils import quote_cmdlinearg
  from datalad.support.exceptions import CapturedException, CommandError, ConnectionOpenFailedError
  from datalad.support.external_versions import external_versions
  from datalad.utils import auto_repr, Path, ensure_list, on_windows
  from datalad.cmd import NoCapture, StdOutErrCapture, WitlessRunner
  from ..None import cfg
label_desc: Use image node_id 9 for calling the BaseSSHConnection obj's underlying member method code with example usage: obj._exec_ssh(ssh_cmd, cmd, options, stdin, log_output) and returns: out,  out