[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M797SHP2MHRMA097RZZZRQ04":3,"skill-same:01M797SHP2MHRMA097RZZZRQ04":78},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":39,"commitSha":40,"skillDirectory":41,"forksCount":42,"repositoryHtmlUrl":43,"repositoryHomepageUrl":6,"ownerHtmlUrl":44,"ownerBlogUrl":45,"ownerDescription":46,"updatedAt":47,"install":48,"resources":61},"01M797SHP2MHRMA097RZZZRQ04","securing-remote-access-to-ot-environment",null,"This skill covers implementing secure remote access to OT\u002FICS environments for operators, engineers, and vendors while preventing unauthorized access that could compromise industrial operations. It addresses jump server architecture, multi-factor authentication, session recording, privileged access management, vendor remote access controls, and compliance with IEC 62443 and NERC CIP-005 remote access requirements.","jukeyman\u002Fjukeyman-skills","jukeyman","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F142960420?v=4","01M78FR4Y3DHMMCBCC0GXXNB3F","RICK JEFFERSON","01M78FR4Z8RVQRAD31Y5J7V6EB",1,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsecuring-remote-access-to-ot-environment\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsecuring-remote-access-to-ot-environment\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: securing-remote-access-to-ot-environment\ndescription: >\n  This skill covers implementing secure remote access to OT\u002FICS environments for\n  operators, engineers, and vendors while preventing unauthorized access that could\n  compromise industrial operations. It addresses jump server architecture, multi-factor\n  authentication, session recording, privileged access management, vendor remote access\n  controls, and compliance with IEC 62443 and NERC CIP-005 remote access requirements.\ndomain: cybersecurity\nsubdomain: ot-ics-security\ntags: [ot-security, ics, scada, industrial-control, iec62443, remote-access, jump-server, mfa]\nversion: 1.0.0\nauthor: mahipal\nlicense: Apache-2.0\n---\n\n# Securing Remote Access to OT Environment\n\n## When to Use\n\n- When implementing or upgrading remote access architecture for OT environments\n- When onboarding vendors who require remote access to OT systems for support and maintenance\n- When implementing CIP-005-7 R2 requirements for remote access management including MFA\n- When replacing legacy direct VPN access to OT networks with a secure jump server architecture\n- When responding to an incident involving unauthorized remote access to industrial control systems\n\n**Do not use** for securing IT-only remote access without OT components, for configuring VPN for corporate workers (see general VPN guides), or for physical access control to OT facilities.\n\n## Prerequisites\n\n- DMZ infrastructure (Level 3.5) between corporate IT and OT networks\n- Jump server\u002Fbastion host platform (CyberArk, BeyondTrust, or hardened Windows\u002FLinux server)\n- Multi-factor authentication solution (Duo, RSA SecurID, YubiKey, smart cards)\n- Session recording capability for audit trail compliance\n- Firewall rules permitting remote access only through the DMZ intermediate system\n\n## Workflow\n\n### Step 1: Design Secure Remote Access Architecture\n\nImplement a defense-in-depth remote access architecture with an intermediate system in the DMZ that prevents any direct network connectivity between external users and OT systems.\n\n```yaml\n# OT Remote Access Architecture\n# Key principle: NO direct connection from external networks to OT systems\n\narchitecture:\n  external_access_point:\n    location: \"Internet-facing firewall\"\n    service: \"VPN gateway (IKEv2\u002FIPsec or SSL VPN)\"\n    authentication: \"Certificate + MFA (CIP-005-7 R2.4)\"\n    controls:\n      - \"Source IP allowlisting for vendor access\"\n      - \"Time-based access windows\"\n      - \"Bandwidth rate limiting\"\n\n  dmz_intermediate_system:\n    location: \"Level 3.5 DMZ\"\n    platform: \"CyberArk Privileged Access Security or hardened jump server\"\n    function: \"Session broker - terminates external connection, initiates new internal connection\"\n    controls:\n      - \"All sessions terminate at jump server (no pass-through)\"\n      - \"Session recording with keystroke logging\"\n      - \"Clipboard and file transfer restrictions\"\n      - \"Session timeout after 30 minutes inactivity\"\n      - \"Concurrent session limits per user\"\n\n  ot_internal_access:\n    location: \"Level 3 \u002F Level 2 OT network\"\n    method: \"Jump server initiates RDP\u002FSSH\u002FVNC to OT systems\"\n    controls:\n      - \"Firewall allows only jump server IP to reach OT\"\n      - \"Protocol restricted (RDP 3389, SSH 22, VNC 5900)\"\n      - \"Destination-specific per user role\"\n\n  vendor_access:\n    description: \"Third-party vendor remote access\"\n    additional_controls:\n      - \"Vendor account disabled by default; enabled on request\"\n      - \"Time-limited access windows (enable\u002Fdisable per session)\"\n      - \"OT operator must co-attend vendor sessions\"\n      - \"Real-time session monitoring by OT security\"\n      - \"No persistent credentials - one-time access tokens\"\n\n# Network flow:\n# User -> VPN -> Firewall -> DMZ Jump Server -> Internal FW -> OT System\n# (Two separate authenticated connections; no direct routing)\n```\n\n### Step 2: Configure Jump Server with Privileged Access Management\n\nDeploy and harden the jump server in the DMZ with session management, recording, and role-based access controls.\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"OT Remote Access Session Manager.\n\nManages authorized remote access sessions to OT environments\nincluding session creation, monitoring, recording, and termination.\nIntegrates with PAM solutions for credential vaulting.\n\"\"\"\n\nimport json\nimport hashlib\nimport sys\nfrom dataclasses import dataclass, field, asdict\nfrom datetime import datetime, timedelta\nfrom enum import Enum\n\n\nclass SessionState(str, Enum):\n    PENDING_APPROVAL = \"pending_approval\"\n    APPROVED = \"approved\"\n    ACTIVE = \"active\"\n    TERMINATED = \"terminated\"\n    EXPIRED = \"expired\"\n    DENIED = \"denied\"\n\n\nclass UserRole(str, Enum):\n    OT_OPERATOR = \"ot_operator\"\n    OT_ENGINEER = \"ot_engineer\"\n    VENDOR = \"vendor\"\n    SECURITY_ANALYST = \"security_analyst\"\n\n\n@dataclass\nclass RemoteAccessSession:\n    session_id: str\n    user_id: str\n    user_role: str\n    source_ip: str\n    target_system: str\n    target_ip: str\n    protocol: str\n    purpose: str\n    state: str = SessionState.PENDING_APPROVAL\n    mfa_verified: bool = False\n    approved_by: str = \"\"\n    created_at: str = \"\"\n    started_at: str = \"\"\n    ended_at: str = \"\"\n    max_duration_minutes: int = 120\n    recording_path: str = \"\"\n    actions_logged: list = field(default_factory=list)\n\n\nclass OTRemoteAccessManager:\n    \"\"\"Manages remote access sessions to OT environment.\"\"\"\n\n    def __init__(self):\n        self.sessions = {}\n        self.active_sessions = {}\n        self.access_policies = {}\n        self.audit_log = []\n\n    def define_access_policy(self, role, allowed_targets, protocols, max_duration):\n        \"\"\"Define access policy for a user role.\"\"\"\n        self.access_policies[role] = {\n            \"allowed_targets\": allowed_targets,\n            \"allowed_protocols\": protocols,\n            \"max_duration_minutes\": max_duration,\n            \"requires_co_attendance\": role == UserRole.VENDOR,\n            \"requires_approval\": role == UserRole.VENDOR,\n        }\n\n    def request_session(self, user_id, user_role, source_ip,\n                        target_system, target_ip, protocol, purpose):\n        \"\"\"Request a new remote access session.\"\"\"\n        # Generate unique session ID\n        session_id = hashlib.sha256(\n            f\"{user_id}{target_ip}{datetime.now().isoformat()}\".encode()\n        ).hexdigest()[:16]\n\n        # Check access policy\n        policy = self.access_policies.get(user_role)\n        if not policy:\n            return None, \"No access policy defined for role\"\n\n        if target_system not in policy[\"allowed_targets\"]:\n            self._audit(\"ACCESS_DENIED\", user_id, target_system,\n                       f\"Target not in allowed list for role {user_role}\")\n            return None, f\"Target {target_system} not authorized for role {user_role}\"\n\n        if protocol not in policy[\"allowed_protocols\"]:\n            self._audit(\"ACCESS_DENIED\", user_id, target_system,\n                       f\"Protocol {protocol} not allowed for role {user_role}\")\n            return None, f\"Protocol {protocol} not authorized\"\n\n        session = RemoteAccessSession(\n            session_id=session_id,\n            user_id=user_id,\n            user_role=user_role,\n            source_ip=source_ip,\n            target_system=target_system,\n            target_ip=target_ip,\n            protocol=protocol,\n            purpose=purpose,\n            max_duration_minutes=policy[\"max_duration_minutes\"],\n            created_at=datetime.now().isoformat(),\n        )\n\n        # Vendor sessions require approval\n        if policy.get(\"requires_approval\"):\n            session.state = SessionState.PENDING_APPROVAL\n        else:\n            session.state = SessionState.APPROVED\n\n        self.sessions[session_id] = session\n        self._audit(\"SESSION_REQUESTED\", user_id, target_system, purpose)\n\n        return session_id, \"Session created\"\n\n    def approve_session(self, session_id, approver_id):\n        \"\"\"Approve a pending vendor session.\"\"\"\n        session = self.sessions.get(session_id)\n        if not session:\n            return False, \"Session not found\"\n        if session.state != SessionState.PENDING_APPROVAL:\n            return False, \"Session not in pending approval state\"\n\n        session.state = SessionState.APPROVED\n        session.approved_by = approver_id\n        self._audit(\"SESSION_APPROVED\", approver_id, session.target_system,\n                    f\"Approved session {session_id} for {session.user_id}\")\n        return True, \"Session approved\"\n\n    def activate_session(self, session_id, mfa_token):\n        \"\"\"Activate an approved session after MFA verification.\"\"\"\n        session = self.sessions.get(session_id)\n        if not session or session.state != SessionState.APPROVED:\n            return False, \"Session not approved\"\n\n        # Verify MFA (simplified - real implementation calls MFA provider)\n        session.mfa_verified = True\n        session.state = SessionState.ACTIVE\n        session.started_at = datetime.now().isoformat()\n        session.recording_path = f\"\u002Frecordings\u002F{session_id}_{datetime.now().strftime('%Y%m%d')}.mp4\"\n\n        self.active_sessions[session_id] = session\n        self._audit(\"SESSION_ACTIVATED\", session.user_id, session.target_system,\n                    f\"MFA verified, recording to {session.recording_path}\")\n\n        return True, \"Session active\"\n\n    def terminate_session(self, session_id, reason=\"manual\"):\n        \"\"\"Terminate an active session.\"\"\"\n        session = self.active_sessions.pop(session_id, None)\n        if not session:\n            session = self.sessions.get(session_id)\n        if not session:\n            return False\n\n        session.state = SessionState.TERMINATED\n        session.ended_at = datetime.now().isoformat()\n        self._audit(\"SESSION_TERMINATED\", session.user_id, session.target_system, reason)\n        return True\n\n    def check_expired_sessions(self):\n        \"\"\"Terminate sessions that have exceeded their maximum duration.\"\"\"\n        now = datetime.now()\n        expired = []\n        for sid, session in list(self.active_sessions.items()):\n            started = datetime.fromisoformat(session.started_at)\n            if (now - started).total_seconds() > session.max_duration_minutes * 60:\n                self.terminate_session(sid, \"maximum_duration_exceeded\")\n                expired.append(sid)\n        return expired\n\n    def _audit(self, event_type, user_id, target, detail):\n        \"\"\"Write to audit log.\"\"\"\n        self.audit_log.append({\n            \"timestamp\": datetime.now().isoformat(),\n            \"event\": event_type,\n            \"user\": user_id,\n            \"target\": target,\n            \"detail\": detail,\n        })\n\n    def generate_report(self):\n        \"\"\"Generate remote access session report.\"\"\"\n        report = []\n        report.append(\"=\" * 70)\n        report.append(\"OT REMOTE ACCESS SESSION REPORT\")\n        report.append(f\"Date: {datetime.now().isoformat()}\")\n        report.append(\"=\" * 70)\n\n        # Session summary\n        total = len(self.sessions)\n        active = sum(1 for s in self.sessions.values() if s.state == SessionState.ACTIVE)\n        report.append(f\"\\nTotal Sessions: {total}\")\n        report.append(f\"Active Sessions: {active}\")\n\n        # Active sessions detail\n        if self.active_sessions:\n            report.append(\"\\nACTIVE SESSIONS:\")\n            for sid, s in self.active_sessions.items():\n                report.append(f\"  [{sid[:8]}] {s.user_id} ({s.user_role})\")\n                report.append(f\"    Target: {s.target_system} ({s.target_ip})\")\n                report.append(f\"    Started: {s.started_at}\")\n                report.append(f\"    MFA: {'Verified' if s.mfa_verified else 'NOT VERIFIED'}\")\n\n        return \"\\n\".join(report)\n\n\nif __name__ == \"__main__\":\n    manager = OTRemoteAccessManager()\n\n    # Define policies\n    manager.define_access_policy(\n        UserRole.OT_ENGINEER,\n        [\"HMI-01\", \"HMI-02\", \"EWS-01\", \"HISTORIAN-01\"],\n        [\"RDP\", \"SSH\"],\n        max_duration=240,\n    )\n    manager.define_access_policy(\n        UserRole.VENDOR,\n        [\"DCS-EWS-01\"],\n        [\"RDP\"],\n        max_duration=120,\n    )\n\n    # Request vendor session\n    sid, msg = manager.request_session(\n        \"vendor_honeywell_01\", UserRole.VENDOR,\n        \"203.0.113.50\", \"DCS-EWS-01\", \"10.30.1.20\",\n        \"RDP\", \"DCS firmware update per change request CR-2026-0045\")\n    print(f\"Session request: {msg} ({sid})\")\n\n    if sid:\n        manager.approve_session(sid, \"ot_manager_01\")\n        manager.activate_session(sid, \"123456\")\n        print(manager.generate_report())\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| Intermediate System | System in the DMZ that terminates external connections and brokers new connections to OT, preventing direct network access per CIP-005 |\n| Jump Server | Hardened bastion host in the DMZ used for remote access sessions to OT systems with session recording and access controls |\n| Session Recording | Capture of all remote access session activity (screen, keystrokes, commands) for security audit and incident investigation |\n| Privileged Access Management (PAM) | System for vaulting credentials, controlling access, and auditing privileged sessions to critical OT systems |\n| Co-Attendance | Requirement for an OT operator to monitor vendor remote access sessions in real time |\n| Time-Limited Access | Vendor accounts enabled only for specific maintenance windows and automatically disabled after the window closes |\n\n## Tools & Systems\n\n- **CyberArk Privileged Access Security**: Enterprise PAM with session management, credential vaulting, and recording for OT remote access\n- **BeyondTrust Privileged Remote Access**: Purpose-built remote access solution with session recording and granular access policies\n- **Claroty Secure Remote Access (SRA)**: OT-specific remote access solution with protocol-aware session controls\n- **Duo Security**: MFA provider supporting push notifications, hardware tokens, and biometrics for OT access verification\n\n## Output Format\n\n```\nOT Remote Access Security Report\n===================================\nActive Sessions: [N]\nPending Approval: [N]\nSessions Today: [N]\n\nMFA COMPLIANCE:\n  All sessions MFA verified: [Yes\u002FNo]\n  Sessions without MFA: [N]\n\nVENDOR ACCESS:\n  Active vendor sessions: [N]\n  Co-attended: [N]\n  Recorded: [N]\n```\n","# Securing Remote Access to OT Environment\n\n## When to Use\n\n- When implementing or upgrading remote access architecture for OT environments\n- When onboarding vendors who require remote access to OT systems for support and maintenance\n- When implementing CIP-005-7 R2 requirements for remote access management including MFA\n- When replacing legacy direct VPN access to OT networks with a secure jump server architecture\n- When responding to an incident involving unauthorized remote access to industrial control systems\n\n**Do not use** for securing IT-only remote access without OT components, for configuring VPN for corporate workers (see general VPN guides), or for physical access control to OT facilities.\n\n## Prerequisites\n\n- DMZ infrastructure (Level 3.5) between corporate IT and OT networks\n- Jump server\u002Fbastion host platform (CyberArk, BeyondTrust, or hardened Windows\u002FLinux server)\n- Multi-factor authentication solution (Duo, RSA SecurID, YubiKey, smart cards)\n- Session recording capability for audit trail compliance\n- Firewall rules permitting remote access only through the DMZ intermediate system\n\n## Workflow\n\n### Step 1: Design Secure Remote Access Architecture\n\nImplement a defense-in-depth remote access architecture with an intermediate system in the DMZ that prevents any direct network connectivity between external users and OT systems.\n\n```yaml\n# OT Remote Access Architecture\n# Key principle: NO direct connection from external networks to OT systems\n\narchitecture:\n  external_access_point:\n    location: \"Internet-facing firewall\"\n    service: \"VPN gateway (IKEv2\u002FIPsec or SSL VPN)\"\n    authentication: \"Certificate + MFA (CIP-005-7 R2.4)\"\n    controls:\n      - \"Source IP allowlisting for vendor access\"\n      - \"Time-based access windows\"\n      - \"Bandwidth rate limiting\"\n\n  dmz_intermediate_system:\n    location: \"Level 3.5 DMZ\"\n    platform: \"CyberArk Privileged Access Security or hardened jump server\"\n    function: \"Session broker - terminates external connection, initiates new internal connection\"\n    controls:\n      - \"All sessions terminate at jump server (no pass-through)\"\n      - \"Session recording with keystroke logging\"\n      - \"Clipboard and file transfer restrictions\"\n      - \"Session timeout after 30 minutes inactivity\"\n      - \"Concurrent session limits per user\"\n\n  ot_internal_access:\n    location: \"Level 3 \u002F Level 2 OT network\"\n    method: \"Jump server initiates RDP\u002FSSH\u002FVNC to OT systems\"\n    controls:\n      - \"Firewall allows only jump server IP to reach OT\"\n      - \"Protocol restricted (RDP 3389, SSH 22, VNC 5900)\"\n      - \"Destination-specific per user role\"\n\n  vendor_access:\n    description: \"Third-party vendor remote access\"\n    additional_controls:\n      - \"Vendor account disabled by default; enabled on request\"\n      - \"Time-limited access windows (enable\u002Fdisable per session)\"\n      - \"OT operator must co-attend vendor sessions\"\n      - \"Real-time session monitoring by OT security\"\n      - \"No persistent credentials - one-time access tokens\"\n\n# Network flow:\n# User -> VPN -> Firewall -> DMZ Jump Server -> Internal FW -> OT System\n# (Two separate authenticated connections; no direct routing)\n```\n\n### Step 2: Configure Jump Server with Privileged Access Management\n\nDeploy and harden the jump server in the DMZ with session management, recording, and role-based access controls.\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"OT Remote Access Session Manager.\n\nManages authorized remote access sessions to OT environments\nincluding session creation, monitoring, recording, and termination.\nIntegrates with PAM solutions for credential vaulting.\n\"\"\"\n\nimport json\nimport hashlib\nimport sys\nfrom dataclasses import dataclass, field, asdict\nfrom datetime import datetime, timedelta\nfrom enum import Enum\n\n\nclass SessionState(str, Enum):\n    PENDING_APPROVAL = \"pending_approval\"\n    APPROVED = \"approved\"\n    ACTIVE = \"active\"\n    TERMINATED = \"terminated\"\n    EXPIRED = \"expired\"\n    DENIED = \"denied\"\n\n\nclass UserRole(str, Enum):\n    OT_OPERATOR = \"ot_operator\"\n    OT_ENGINEER = \"ot_engineer\"\n    VENDOR = \"vendor\"\n    SECURITY_ANALYST = \"security_analyst\"\n\n\n@dataclass\nclass RemoteAccessSession:\n    session_id: str\n    user_id: str\n    user_role: str\n    source_ip: str\n    target_system: str\n    target_ip: str\n    protocol: str\n    purpose: str\n    state: str = SessionState.PENDING_APPROVAL\n    mfa_verified: bool = False\n    approved_by: str = \"\"\n    created_at: str = \"\"\n    started_at: str = \"\"\n    ended_at: str = \"\"\n    max_duration_minutes: int = 120\n    recording_path: str = \"\"\n    actions_logged: list = field(default_factory=list)\n\n\nclass OTRemoteAccessManager:\n    \"\"\"Manages remote access sessions to OT environment.\"\"\"\n\n    def __init__(self):\n        self.sessions = {}\n        self.active_sessions = {}\n        self.access_policies = {}\n        self.audit_log = []\n\n    def define_access_policy(self, role, allowed_targets, protocols, max_duration):\n        \"\"\"Define access policy for a user role.\"\"\"\n        self.access_policies[role] = {\n            \"allowed_targets\": allowed_targets,\n            \"allowed_protocols\": protocols,\n            \"max_duration_minutes\": max_duration,\n            \"requires_co_attendance\": role == UserRole.VENDOR,\n            \"requires_approval\": role == UserRole.VENDOR,\n        }\n\n    def request_session(self, user_id, user_role, source_ip,\n                        target_system, target_ip, protocol, purpose):\n        \"\"\"Request a new remote access session.\"\"\"\n        # Generate unique session ID\n        session_id = hashlib.sha256(\n            f\"{user_id}{target_ip}{datetime.now().isoformat()}\".encode()\n        ).hexdigest()[:16]\n\n        # Check access policy\n        policy = self.access_policies.get(user_role)\n        if not policy:\n            return None, \"No access policy defined for role\"\n\n        if target_system not in policy[\"allowed_targets\"]:\n            self._audit(\"ACCESS_DENIED\", user_id, target_system,\n                       f\"Target not in allowed list for role {user_role}\")\n            return None, f\"Target {target_system} not authorized for role {user_role}\"\n\n        if protocol not in policy[\"allowed_protocols\"]:\n            self._audit(\"ACCESS_DENIED\", user_id, target_system,\n                       f\"Protocol {protocol} not allowed for role {user_role}\")\n            return None, f\"Protocol {protocol} not authorized\"\n\n        session = RemoteAccessSession(\n            session_id=session_id,\n            user_id=user_id,\n            user_role=user_role,\n            source_ip=source_ip,\n            target_system=target_system,\n            target_ip=target_ip,\n            protocol=protocol,\n            purpose=purpose,\n            max_duration_minutes=policy[\"max_duration_minutes\"],\n            created_at=datetime.now().isoformat(),\n        )\n\n        # Vendor sessions require approval\n        if policy.get(\"requires_approval\"):\n            session.state = SessionState.PENDING_APPROVAL\n        else:\n            session.state = SessionState.APPROVED\n\n        self.sessions[session_id] = session\n        self._audit(\"SESSION_REQUESTED\", user_id, target_system, purpose)\n\n        return session_id, \"Session created\"\n\n    def approve_session(self, session_id, approver_id):\n        \"\"\"Approve a pending vendor session.\"\"\"\n        session = self.sessions.get(session_id)\n        if not session:\n            return False, \"Session not found\"\n        if session.state != SessionState.PENDING_APPROVAL:\n            return False, \"Session not in pending approval state\"\n\n        session.state = SessionState.APPROVED\n        session.approved_by = approver_id\n        self._audit(\"SESSION_APPROVED\", approver_id, session.target_system,\n                    f\"Approved session {session_id} for {session.user_id}\")\n        return True, \"Session approved\"\n\n    def activate_session(self, session_id, mfa_token):\n        \"\"\"Activate an approved session after MFA verification.\"\"\"\n        session = self.sessions.get(session_id)\n        if not session or session.state != SessionState.APPROVED:\n            return False, \"Session not approved\"\n\n        # Verify MFA (simplified - real implementation calls MFA provider)\n        session.mfa_verified = True\n        session.state = SessionState.ACTIVE\n        session.started_at = datetime.now().isoformat()\n        session.recording_path = f\"\u002Frecordings\u002F{session_id}_{datetime.now().strftime('%Y%m%d')}.mp4\"\n\n        self.active_sessions[session_id] = session\n        self._audit(\"SESSION_ACTIVATED\", session.user_id, session.target_system,\n                    f\"MFA verified, recording to {session.recording_path}\")\n\n        return True, \"Session active\"\n\n    def terminate_session(self, session_id, reason=\"manual\"):\n        \"\"\"Terminate an active session.\"\"\"\n        session = self.active_sessions.pop(session_id, None)\n        if not session:\n            session = self.sessions.get(session_id)\n        if not session:\n            return False\n\n        session.state = SessionState.TERMINATED\n        session.ended_at = datetime.now().isoformat()\n        self._audit(\"SESSION_TERMINATED\", session.user_id, session.target_system, reason)\n        return True\n\n    def check_expired_sessions(self):\n        \"\"\"Terminate sessions that have exceeded their maximum duration.\"\"\"\n        now = datetime.now()\n        expired = []\n        for sid, session in list(self.active_sessions.items()):\n            started = datetime.fromisoformat(session.started_at)\n            if (now - started).total_seconds() > session.max_duration_minutes * 60:\n                self.terminate_session(sid, \"maximum_duration_exceeded\")\n                expired.append(sid)\n        return expired\n\n    def _audit(self, event_type, user_id, target, detail):\n        \"\"\"Write to audit log.\"\"\"\n        self.audit_log.append({\n            \"timestamp\": datetime.now().isoformat(),\n            \"event\": event_type,\n            \"user\": user_id,\n            \"target\": target,\n            \"detail\": detail,\n        })\n\n    def generate_report(self):\n        \"\"\"Generate remote access session report.\"\"\"\n        report = []\n        report.append(\"=\" * 70)\n        report.append(\"OT REMOTE ACCESS SESSION REPORT\")\n        report.append(f\"Date: {datetime.now().isoformat()}\")\n        report.append(\"=\" * 70)\n\n        # Session summary\n        total = len(self.sessions)\n        active = sum(1 for s in self.sessions.values() if s.state == SessionState.ACTIVE)\n        report.append(f\"\\nTotal Sessions: {total}\")\n        report.append(f\"Active Sessions: {active}\")\n\n        # Active sessions detail\n        if self.active_sessions:\n            report.append(\"\\nACTIVE SESSIONS:\")\n            for sid, s in self.active_sessions.items():\n                report.append(f\"  [{sid[:8]}] {s.user_id} ({s.user_role})\")\n                report.append(f\"    Target: {s.target_system} ({s.target_ip})\")\n                report.append(f\"    Started: {s.started_at}\")\n                report.append(f\"    MFA: {'Verified' if s.mfa_verified else 'NOT VERIFIED'}\")\n\n        return \"\\n\".join(report)\n\n\nif __name__ == \"__main__\":\n    manager = OTRemoteAccessManager()\n\n    # Define policies\n    manager.define_access_policy(\n        UserRole.OT_ENGINEER,\n        [\"HMI-01\", \"HMI-02\", \"EWS-01\", \"HISTORIAN-01\"],\n        [\"RDP\", \"SSH\"],\n        max_duration=240,\n    )\n    manager.define_access_policy(\n        UserRole.VENDOR,\n        [\"DCS-EWS-01\"],\n        [\"RDP\"],\n        max_duration=120,\n    )\n\n    # Request vendor session\n    sid, msg = manager.request_session(\n        \"vendor_honeywell_01\", UserRole.VENDOR,\n        \"203.0.113.50\", \"DCS-EWS-01\", \"10.30.1.20\",\n        \"RDP\", \"DCS firmware update per change request CR-2026-0045\")\n    print(f\"Session request: {msg} ({sid})\")\n\n    if sid:\n        manager.approve_session(sid, \"ot_manager_01\")\n        manager.activate_session(sid, \"123456\")\n        print(manager.generate_report())\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| Intermediate System | System in the DMZ that terminates external connections and brokers new connections to OT, preventing direct network access per CIP-005 |\n| Jump Server | Hardened bastion host in the DMZ used for remote access sessions to OT systems with session recording and access controls |\n| Session Recording | Capture of all remote access session activity (screen, keystrokes, commands) for security audit and incident investigation |\n| Privileged Access Management (PAM) | System for vaulting credentials, controlling access, and auditing privileged sessions to critical OT systems |\n| Co-Attendance | Requirement for an OT operator to monitor vendor remote access sessions in real time |\n| Time-Limited Access | Vendor accounts enabled only for specific maintenance windows and automatically disabled after the window closes |\n\n## Tools & Systems\n\n- **CyberArk Privileged Access Security**: Enterprise PAM with session management, credential vaulting, and recording for OT remote access\n- **BeyondTrust Privileged Remote Access**: Purpose-built remote access solution with session recording and granular access policies\n- **Claroty Secure Remote Access (SRA)**: OT-specific remote access solution with protocol-aware session controls\n- **Duo Security**: MFA provider supporting push notifications, hardware tokens, and biometrics for OT access verification\n\n## Output Format\n\n```\nOT Remote Access Security Report\n===================================\nActive Sessions: [N]\nPending Approval: [N]\nSessions Today: [N]\n\nMFA COMPLIANCE:\n  All sessions MFA verified: [Yes\u002FNo]\n  Sessions without MFA: [N]\n\nVENDOR ACCESS:\n  Active vendor sessions: [N]\n  Co-attended: [N]\n  Recorded: [N]\n```\n",{"name":5,"tags":25,"author":34,"domain":35,"license":15,"version":36,"subdomain":37,"description":38},[26,27,28,29,30,31,32,33],"ot-security","ics","scada","industrial-control","iec62443","remote-access","jump-server","mfa","mahipal","cybersecurity","1.0.0","ot-ics-security","This skill covers implementing secure remote access to OT\u002FICS environments for operators, engineers, and vendors while preventing unauthorized access that could compromise industrial operations. It addresses jump server architecture, multi-factor authentication, session recording, privileged access management, vendor remote access controls, and compliance with IEC 62443 and NERC CIP-005 remote access requirements.\n","main","99825ad3f3bcc6597ddcc7294a14e6e922f2b67b","skills\u002Fsecuring-remote-access-to-ot-environment",0,"https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills","https:\u002F\u002Fgithub.com\u002Fjukeyman","https:\u002F\u002FRJBUSINESSSOLUTIONS.ORG","Credit and Finance Expert | Developer\r\n\r\nI'm Rick Jefferson, a seasoned credit and finance expert with over a decade of experience in financial literacy,","2026-07-13 07:03:29",{"source":8,"skillName":5,"commands":49,"prompt":59,"zipAvailable":60},[50,53,56],{"tool":51,"command":52},"npx","npx skills add jukeyman\u002Fjukeyman-skills --skill securing-remote-access-to-ot-environment",{"tool":54,"command":55},"bunx","bunx skills add jukeyman\u002Fjukeyman-skills --skill securing-remote-access-to-ot-environment",{"tool":57,"command":58},"pnpm","pnpm dlx skills add jukeyman\u002Fjukeyman-skills --skill securing-remote-access-to-ot-environment","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsecuring-remote-access-to-ot-environment\u002FSKILL.md",true,[62,66,72],{"path":63,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":65,"sourceHtmlUrl":16},"LICENSE","许可证",11255,{"path":67,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":70,"sourceHtmlUrl":71},"references\u002Fapi-reference.md","REFERENCE","参考文档",1737,"https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsecuring-remote-access-to-ot-environment\u002Freferences\u002Fapi-reference.md",{"path":73,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":76,"sourceHtmlUrl":77},"scripts\u002Fagent.py","SCRIPT","脚本",7218,"https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsecuring-remote-access-to-ot-environment\u002Fscripts\u002Fagent.py",[79,87,94,101,108,116],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":83,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":20},"01M79ANS2SM329NEP5ZCX106RR","zustand-store-creator","Create zustand store creator operations. Auto-activating skill for Frontend Development.\nTriggers on: zustand store creator, zustand store creator\nPart of the Frontend Development skill category. Use when working with zustand store creator functionality. Trigger with phrases like \"zustand store creator\", \"zustand creator\", \"zustand\".","MIT","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzustand-store-creator\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":83,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":20},"01M79AMZKP4YDEZ7EHG1Y7PP74","zero-trust-config-helper","Configure with zero trust config helper operations. Auto-activating skill for Security Advanced.\nTriggers on: zero trust config helper, zero trust config helper\nPart of the Security Advanced skill category. Use when configuring systems or services. Trigger with phrases like \"zero trust config helper\", \"zero helper\", \"zero\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzero-trust-config-helper\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":83,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":20},"01M79AMJSBCEJQNBTYNAHYN5HM","zapier-integration-helper","Assist with zapier integration helper operations. Auto-activating skill for Business Automation.\nTriggers on: zapier integration helper, zapier integration helper\nPart of the Business Automation skill category. Use when working with APIs or building integrations. Trigger with phrases like \"zapier integration helper\", \"zapier helper\", \"zapier\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzapier-integration-helper\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":83,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":20},"01M79AHJZGVMARS13VFQYRR1MP","yaml-config-validator","Validate yaml config validator operations. Auto-activating skill for DevOps Basics.\nTriggers on: yaml config validator, yaml config validator\nPart of the DevOps Basics skill category. Use when configuring systems or services. Trigger with phrases like \"yaml config validator\", \"yaml validator\", \"yaml\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fyaml-config-validator\u002FSKILL.md",[],[],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":83,"licenseFileUrl":112,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":20},"01M79AHGDZRN0020RDQSQDPAM8","xvary-stock-research","Thesis-driven equity analysis from public SEC EDGAR and market data; \u002Fanalyze, \u002Fscore, \u002Fcompare workflows with bundled Python tools (Claude Code, Cursor, Codex).","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FSKILL.md",[],[],{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":83,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":20},"01M79AHCYJ9FV9RMHQ24HDRN33","xss-vulnerability-scanner","Scan xss vulnerability scanner operations. Auto-activating skill for Security Fundamentals.\nTriggers on: xss vulnerability scanner, xss vulnerability scanner\nPart of the Security Fundamentals skill category. Use when working with xss vulnerability scanner functionality. Trigger with phrases like \"xss vulnerability scanner\", \"xss scanner\", \"xss\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxss-vulnerability-scanner\u002FSKILL.md",[],[]]