Index: jupyter_client/connect.py
--- jupyter_client/connect.py.orig
+++ jupyter_client/connect.py
@@ -15,6 +15,7 @@ import socket
 import stat
 import tempfile
 import warnings
+import sys
 from getpass import getpass
 from typing import TYPE_CHECKING, Any, Dict, Union, cast
 
@@ -156,7 +157,7 @@ def write_connection_file(
     with secure_write(fname) as f:
         f.write(json.dumps(cfg, indent=2))
 
-    if hasattr(stat, "S_ISVTX"):
+    if hasattr(stat, "S_ISVTX") and not sys.platform.startswith('openbsd'):
         # set the sticky bit on the parent directory of the file
         # to ensure only owner can remove it
         runtime_dir = os.path.dirname(fname)
