def __init__(self, host, port=22, username=None, password=None,
               key_filename=None, cwd=None, label=None, redirect_output=False,
               block=False):
    """
    If username, password, and key_filename are None, the SSH will be use the
    default ssh key loaded into the system and will work if the destination
    host is configured to accept that key.

    Args:
      host: the server address to connect to.
      port: the server port to connect to (default 22)
      username: the username to authenticate as (default local username)
      password: password to authenticate or to unlock the private key
      key_filename: private key for authentication
      cwd: working dir for commands
      label: human readable label to associated with output
      redirect_output: If true remote stdout & stderr are redirected to stdout
      block: if True execute_command will block until the command is complete
    """
    self._host = host
    self._port = port
    self._username = username
    self._password = password
    self._key_filename = key_filename
    self._ssh_client = None
    self._ssh_cls = None
    self.redirect_output = redirect_output
    self.block = block
    self.cwd = cwd
    self.label = label or ""

    if self._ssh_cls is None:
      try:
        import paramiko
      except __HOLE__:
        raise RuntimeError('''Must install paramiko to use ssh: \n'''
                           ''' $ sudo pip install paramiko ''')
      # Suppress normal SSH messages
      logging.getLogger("paramiko").setLevel(logging.WARN)
      self._ssh_cls = paramiko.SSHClient
    self.log = logging.getLogger("SSHEntity")
dataset/ETHPy150Open ucb-sts/sts/sts/entities/base.py/SSHEntity.__init__