code: def __init__(
      self,
      hostname: str,
      ssh_port: int,
      user: str,
      id_rsa_path: PathLike,
      ports_lock: PortsLock,
      run_name: str,
      dockerized: bool,
      control_sock_path: Optional[str] = None,
  ):
      self._ports_lock = ports_lock
      self.ports = ports_lock.dict()
      self.run_name = run_name
      self.tunnel = ClientTunnel(
          run_name,
          self.ports,
          id_rsa_path=id_rsa_path,
          control_sock_path=control_sock_path,
      )
      self.host_config = {
          "HostName": hostname,
          "Port": ssh_port,
          "User": user,
          "IdentityFile": id_rsa_path,
          "StrictHostKeyChecking": "no",
          "UserKnownHostsFile": "/dev/null",
      }
      if dockerized:
          self.container_config = {
              "HostName": "localhost",
              "Port": 10022,
              "User": "root",
              "IdentityFile": id_rsa_path,
              "StrictHostKeyChecking": "no",
              "UserKnownHostsFile": "/dev/null",
              "ControlPath": self.tunnel.control_sock_path,
              "ControlMaster": "auto",
              "ControlPersist": "yes",
              "ProxyJump": f"{run_name}-host",
          }
      else:
          self.container_config = None
      self.ssh_config_path = str(ConfigManager().dstack_ssh_config_path)
  
file_path: dstack/src/dstack/_internal/core/services/ssh/attach.py
imports: import atexit
  import re
  import subprocess
  import time
  from typing import Optional, Tuple
  from dstack._internal.core.errors import SSHError
  from dstack._internal.core.services.configs import ConfigManager
  from dstack._internal.core.services.ssh.ports import PortsLock
  from dstack._internal.core.services.ssh.tunnel import ClientTunnel
  from dstack._internal.utils.path import PathLike
  from dstack._internal.utils.ssh import get_ssh_config, include_ssh_config, update_ssh_config
label_desc: Use image node_id 2 to create a new SSHAttach object  with example: obj = SSHAttach(hostname, ssh_port, user, id_rsa_path, ports_lock, run_name, dockerized, control_sock_path)