class_docstr: SSHTunnel represents a control to start, stop and check an SSH tunnel status.
  Its internal state could be serialized to a file and restored from it using pydantic.
code: def stop(self):
      logger.info("Stopping SSH tunnel for %s", self.sock_path)
      r = subprocess.run(self.exit_cmd, timeout=5, capture_output=True)
      shutil.rmtree(self.temp_dir, ignore_errors=True)
  
file_path: dstack/gateway/src/dstack/gateway/services/tunnel.py
imports: import logging
  import os
  import shlex
  import shutil
  import subprocess
  import tempfile
  from typing import List, Optional
  from pydantic import BaseModel
  from dstack.gateway.errors import SSHError
label_desc: Use image node_id 4 for calling the SSHTunnel obj's underlying member method code with example usage: obj.stop() without return types