class_docstr: Representation of an SSH connection.
      
class_docstr_tok: ["Representation","of","an","SSH","connection","."]
docstr: Executes a command on the remote.
  
  It is the callers responsibility to properly quote commands
  for remote execution (e.g. filename with spaces of other special
  characters).
  
  Parameters
  ----------
  cmd: str
    command to run on the remote
  options : list of str, optional
    Additional options to pass to the `-o` flag of `ssh`. Note: Many
    (probably most) of the available configuration options should not be
    set here because they can critically change the properties of the
    connection. This exists to allow options like SendEnv to be set.
  log_output: bool
    Whether to capture and return stdout+stderr.
  
  Returns
  -------
  tuple of str
    stdout, stderr of the command run, if `log_output` was `True`
code: def __call__(self, cmd, options=None, stdin=None, log_output=True):
      """Executes a command on the remote.
  
      It is the callers responsibility to properly quote commands
      for remote execution (e.g. filename with spaces of other special
      characters).
  
      Parameters
      ----------
      cmd: str
        command to run on the remote
      options : list of str, optional
        Additional options to pass to the `-o` flag of `ssh`. Note: Many
        (probably most) of the available configuration options should not be
        set here because they can critically change the properties of the
        connection. This exists to allow options like SendEnv to be set.
      log_output: bool
        Whether to capture and return stdout+stderr.
  
      Returns
      -------
      tuple of str
        stdout, stderr of the command run, if `log_output` was `True`
      """
      raise NotImplementedError
  
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 2 for calling the BaseSSHConnection obj's underlying member method code with example usage: obj.__call__(cmd, options, stdin, log_output) without return types