STATIC AGENT PROVISIONING: SSH OUTBOUND & INBOUND JNLP / WEBSOCKET SETUP

Industrial reference and systems architecture guide for B.Tech Cloud & DevOps Engineers and Infrastructure Architects: Operating system prerequisites, dedicated systemd user creation, SSH key exchange via SSH Build Agents Plugin, Inbound agent.jar mechanics, Windows service registration, and remoting security boundaries.

πŸ–₯️ Permanent Compute Nodes: Building Persistent, Dedicated Worker Fleets

While containerized ephemeral pods on Kubernetes represent the modern cloud-native paradigm for microservices, enterprise delivery platforms still rely extensively on Permanent Static Build Agents. Workloads that require specialized native hardware (such as Apple Silicon macOS nodes for iOS/Xcode compilation, dedicated GPU rigs for AI/ML inference pipelines, physical embedded test benches, or legacy Windows .NET Framework systems) must be provisioned as long-lived, high-capacity worker nodes. Integrating a static node into a Jenkins cluster follows two primary architectural launch topologies: Outbound SSH Agents (where the controller initiates an encrypted SSH session to launch remoting) and Inbound JNLP/WebSocket Agents (where the agent initiates a reverse tunnel back to the controller). This guide details the complete provisioning lifecycle across Linux and Windows environments.

1. Architectural Topology: Outbound SSH vs. Inbound JNLP / WebSocket
A comprehensive network and process comparison evaluating initiator direction, firewall constraints, remoting transport protocols, and OS compatibility.
ASCII Architecture: Launch Topologies & Channel Directionality
STATIC AGENT CONNECTION MODES & DIRECTIONALITY:

1. OUTBOUND LAUNCH TOPOLOGY (SSH BUILD AGENTS):
   Controller initiates connection βž” Agent listens on Port 22

   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
   β”‚    JENKINS CONTROLLER     β”‚                       β”‚    STATIC LINUX / MAC     β”‚
   β”‚                           β”‚                       β”‚    AGENT WORKER NODE      β”‚
   β”‚ β€’ SSH Build Agents Plugin β”‚  SSH (Port 22 / TCP)  β”‚ β€’ OpenSSH Server (sshd)   β”‚
   β”‚ β€’ Private SSH Key Store   β”‚ ────────────────────► β”‚ β€’ Dedicated jenkins user  β”‚
   β”‚ β€’ Uploads remoting.jar    β”‚                       β”‚ β€’ OpenJDK 17/21 Runtime   β”‚
   β”‚ β€’ Spawns slave JVM processβ”‚                       β”‚ β€’ /var/jenkins workspace  β”‚
   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
   β€’ Requirement: Controller must have direct IP routing and firewall access to Port 22 on Agent.
   β€’ Operating Systems: Linux (Ubuntu, Debian, RHEL, Rocky), macOS, BSD.

─────────────────────────────────────────────────────────────────────────────────────────────

2. INBOUND LAUNCH TOPOLOGY (JNLP / WEBSOCKET REVERSE TUNNEL):
   Agent initiates connection βž” Controller listens on Port 8080/443 (or TCP 50000)

   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
   β”‚    STATIC WORKER NODE     β”‚                       β”‚    JENKINS CONTROLLER     β”‚
   β”‚   (Linux / Windows / Mac) β”‚                       β”‚                           β”‚
   β”‚                           β”‚  HTTPS / WebSocket    β”‚ β€’ Web UI & API (Port 443) β”‚
   β”‚ β€’ agent.jar / remoting    β”‚ ────────────────────► β”‚ β€’ Inbound Agent Listener  β”‚
   β”‚ β€’ Node Secret (HMAC-SHA)  β”‚  (Port 443 or 50000)  β”‚ β€’ Verifies Cryptographic  β”‚
   β”‚ β€’ Runs as System Service  β”‚                       β”‚   Node Secret String      β”‚
   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
   β€’ Requirement: Worker node requires only outbound HTTPS (Port 443) egress to Controller.
   β€’ Ideal For: Agents located behind corporate NAT, strict egress firewalls, or Windows Server.

TOPOLOGY DECISION MATRIX:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ CHARACTERISTIC          β”‚ OUTBOUND SSH LAUNCHER        β”‚ INBOUND WEBSOCKET LAUNCHER   β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Connection Initiator    β”‚ Controller connects to Agent β”‚ Agent connects to Controller β”‚
β”‚ Agent Firewall Ports    β”‚ Port 22/TCP MUST be open     β”‚ Zero inbound ports open (NAT)β”‚
β”‚ Controller Port Need    β”‚ None (standard local socket) β”‚ Port 8080/443 (HTTP/WS)      β”‚
β”‚ OS Native Target        β”‚ Linux / macOS / Unix         β”‚ Windows / Cross-Platform     β”‚
β”‚ Lifecycle Control       β”‚ Controller auto-reboots node β”‚ Node service manages restart β”‚
β”‚ Setup Complexity        β”‚ Low (Controller pushes jar)  β”‚ Medium (Manual bootstrap/svc)β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Architectural Recommendation: Deploy Outbound SSH agents for Linux/Unix machines residing in the same secure VPC or data center subnet as the controller. Deploy Inbound WebSocket agents for Windows builders, remote branch offices, or machines residing behind restrictive network address translation (NAT).
2. Host Prerequisites & Systemd User Sandboxing (Linux Agent)
Hardening the target Linux worker machine: Creating an unprivileged dedicated jenkins user, provisioning directory structures, and verifying OpenJDK 17 runtime baselines.
Bash (Target Linux Node System Configuration & User Provisioning)
#!/usr/bin/env bash
# ==============================================================================
# Host Baseline Setup for Dedicated Linux Jenkins Worker Node
# Run with root/sudo privileges on target agent host (Ubuntu/Debian/RHEL)
# ==============================================================================
set -euo pipefail

echo "[*] Step 1: Installing OpenJDK 17 LTS, OpenSSH server, and build utilities..."
if command -v apt-get > /dev/null; then
    sudo apt-get update -y
    sudo apt-get install -y openjdk-17-jdk openssh-server curl git tar unzip build-essential
elif command -v dnf > /dev/null; then
    sudo dnf install -y java-17-openjdk java-17-openjdk-devel openssh-server curl git tar gcc gcc-c++
fi

echo "[*] Step 2: Creating unprivileged dedicated 'jenkins' system user..."
# Enforce predictable UID/GID 1000 for cross-container alignment
if ! id -u jenkins > /dev/null 2>&1; then
    sudo useradd -m -d /home/jenkins -s /bin/bash -u 1000 jenkins
    echo "[+] Created user 'jenkins' (UID 1000)."
else
    echo "[!] User 'jenkins' already exists."
fi

echo "[*] Step 3: Provisioning dedicated remote workspace directory..."
sudo mkdir -p /var/jenkins
sudo chown -R jenkins:jenkins /var/jenkins
sudo chmod -R 775 /var/jenkins

echo "[*] Step 4: Configuring SSH directory and authorized_keys..."
sudo -u jenkins mkdir -p /home/jenkins/.ssh
sudo -u jenkins chmod 700 /home/jenkins/.ssh
sudo -u jenkins touch /home/jenkins/.ssh/authorized_keys
sudo -u jenkins chmod 600 /home/jenkins/.ssh/authorized_keys

echo "[*] Step 5: Verifying Java version compliance..."
sudo -u jenkins java -version

echo "[βœ”] Host provisioning complete. Ready for SSH public key injection."
Console Output: [*] Step 2: Creating unprivileged dedicated 'jenkins' system user... [+] Created user 'jenkins' (UID 1000). [*] Step 3: Provisioning dedicated remote workspace directory... [*] Step 5: Verifying Java version compliance... openjdk version "17.0.10" 2024-01-16 OpenJDK Runtime Environment (build 17.0.10+7-Ubuntu-122.04.1) OpenJDK 64-Bit Server VM (build 17.0.10+7-Ubuntu-122.04.1, mixed mode, sharing) [βœ”] Host provisioning complete. Ready for SSH public key injection.
3. Outbound SSH Agent Setup: Key Exchange & Node Configuration
Complete cryptographic handshake setup: Generating Ed25519 authentication keys, registering credentials, configuring node settings via the web UI, and analyzing the launch log.
Bash (Generating Agent SSH Key Pair on Controller & Distributing Public Key)
# ==============================================================================
# Executed on Jenkins Controller (or Administrator Terminal)
# ==============================================================================

# 1. Generate dedicated Ed25519 key pair without passphrase
ssh-keygen -t ed25519 -C "jenkins-controller-to-static-agent" -f ~/.ssh/id_ed25519_jenkins_agent -N ""

# 2. Append the public key to the target agent node's authorized_keys
AGENT_IP="192.168.1.150"
ssh-copy-id -i ~/.ssh/id_ed25519_jenkins_agent.pub jenkins@${AGENT_IP}

# 3. Test manual SSH connection as the jenkins user
ssh -i ~/.ssh/id_ed25519_jenkins_agent jenkins@${AGENT_IP} "java -version"
Step-by-Step UI Node Registration Procedure
CONFIGURING THE SSH AGENT IN THE JENKINS DASHBOARD:

1. Register Private Key Credential:
   β€’ Navigate to: Manage Jenkins βž” Credentials βž” System βž” Global credentials βž” Add Credentials.
   β€’ Kind: SSH Username with private key
   β€’ ID: static-agent-ssh-key
   β€’ Username: jenkins
   β€’ Private Key: Select "Enter directly" βž” Paste contents of ~/.ssh/id_ed25519_jenkins_agent
   β€’ Click "Create".

2. Create New Node:
   β€’ Navigate to: Manage Jenkins βž” Nodes βž” "New Node".
   β€’ Node name: linux-static-builder-01
   β€’ Type: Permanent Agent βž” Click "Create".

3. Configure Node Settings:
   β€’ Number of executors: 4 (Determines concurrent build slots; matches physical CPU cores)
   β€’ Remote root directory: /var/jenkins
   β€’ Labels: linux-x86 high-spec docker-host
   β€’ Usage: Only build jobs with label expressions matching this node
   β€’ Launch method: "Launch agents via SSH"
     - Host: 192.168.1.150
     - Credentials: Select "jenkins (static-agent-ssh-key)"
     - Host Key Verification Strategy: Known hosts file Verification Strategy
       (or "Manually trusted key Verification Strategy")
     - Port: 22
   β€’ Availability: Keep this agent online as much as possible
   β€’ Click "Save".
Jenkins Node Launch Log: [11/06/26 20:35:10] [SSH] Opening SSH connection to 192.168.1.150:22. [11/06/26 20:35:11] [SSH] Authenticating as jenkins using ID 'static-agent-ssh-key' (ed25519). [11/06/26 20:35:11] [SSH] Authentication successful. [11/06/26 20:35:11] [SSH] Checking java version... [11/06/26 20:35:12] [SSH] java -version returned 17.0.10. [11/06/26 20:35:12] [SSH] Copying latest remoting.jar... [11/06/26 20:35:13] [SSH] Copied 3,412,189 bytes. [11/06/26 20:35:13] [SSH] Starting agent process: cd "/var/jenkins" && java -jar remoting.jar -workDir /var/jenkins Agent successfully connected and online. Version: 3206.vb_15d_381e7722 Process ID: 29481
4. Inbound JNLP / WebSocket Agent Setup (Linux & macOS)
Connecting an agent behind a firewall or NAT: Generating node secrets, downloading agent.jar, running the remoting daemon, and daemonizing with systemd.
Bash (Bootstrapping Inbound Agent & Systemd Service Unit)
#!/usr/bin/env bash
# ==============================================================================
# Inbound WebSocket Agent Automation Script (Linux Systemd Integration)
# ==============================================================================
set -euo pipefail

JENKINS_URL="https://jenkins.company.com/"
NODE_NAME="linux-inbound-agent-01"
# Retrieve the 64-character secret from: Node Dashboard βž” Status
NODE_SECRET="a8f3b21c4e90d782194b1234567890abcdef1234567890abcdef1234567890ab"
AGENT_DIR="/var/jenkins"

sudo mkdir -p "${AGENT_DIR}"
cd "${AGENT_DIR}"

echo "[*] Step 1: Downloading canonical agent.jar from Controller..."
sudo curl -fsSL -o "${AGENT_DIR}/agent.jar" "${JENKINS_URL}jnlpJars/agent.jar"
sudo chown -R jenkins:jenkins "${AGENT_DIR}"

echo "[*] Step 2: Creating Systemd Service Unit for Auto-Recovery on Boot..."
sudo tee /etc/systemd/system/jenkins-agent.service > /dev/null << EOF
[Unit]
Description=Jenkins Inbound Worker Agent Daemon
After=network.target network-online.target
Wants=network-online.target

[Service]
Type=simple
User=jenkins
Group=jenkins
WorkingDirectory=${AGENT_DIR}
ExecStart=/usr/bin/java -jar ${AGENT_DIR}/agent.jar \\
    -url ${JENKINS_URL} \\
    -secret ${NODE_SECRET} \\
    -name ${NODE_NAME} \\
    -workDir ${AGENT_DIR} \\
    -webSocket
Restart=always
RestartSec=10
LimitNOFILE=65536

[Install]
WantedBy=multi-user.target
EOF

echo "[*] Step 3: Enabling and launching systemd service..."
sudo systemctl daemon-reload
sudo systemctl enable --now jenkins-agent.service

echo "[*] Step 4: Inspecting active connection status..."
sudo systemctl status jenkins-agent.service --no-pager
Systemd Service Verification: ● jenkins-agent.service - Jenkins Inbound Worker Agent Daemon Loaded: loaded (/etc/systemd/system/jenkins-agent.service; enabled; vendor preset: enabled) Active: active (running) since Fri 2026-11-06 20:35:45 UTC; 4s ago Main PID: 31204 (java) Tasks: 21 (limit: 19137) CGroup: /system.slice/jenkins-agent.service └─31204 /usr/bin/java -jar /var/jenkins/agent.jar -url https://jenkins.company.com/ -secret a8f3... -name linux-inbound-agent-01 -workDir /var/jenkins -webSocket Nov 06 20:35:46 node01 java[31204]: INFO: WebSocket connection open Nov 06 20:35:47 node01 java[31204]: INFO: Connected to Jenkins
5. Inbound Agent Setup on Windows Server (Winsw & Windows Services)
Registering an inbound agent on Windows Server as a resilient background Windows Service using WinSW (Windows Service Wrapper) and PowerShell.
PowerShell (Automating Windows Service Installation via WinSW)
# ==============================================================================
# Run inside Administrator PowerShell on Windows Server 2019 / 2022
# ==============================================================================
$ErrorActionPreference = "Stop"

$JenkinsUrl = "https://jenkins.company.com/"
$NodeName   = "windows-build-agent-01"
$NodeSecret = "b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0"
$WorkDir    = "C:\Jenkins"

# Create target directories
New-Item -ItemType Directory -Force -Path $WorkDir
Set-Location $WorkDir

Write-Host "[*] Step 1: Downloading agent.jar from Controller..."
Invoke-WebRequest -Uri "$($JenkinsUrl)jnlpJars/agent.jar" -OutFile "$WorkDir\agent.jar"

Write-Host "[*] Step 2: Downloading WinSW (Windows Service Wrapper) executable..."
$WinSWUrl = "https://github.com/winsw/winsw/releases/download/v2.12.0/WinSW-x64.exe"
Invoke-WebRequest -Uri $WinSWUrl -OutFile "$WorkDir\jenkins-agent.exe"

Write-Host "[*] Step 3: Generating WinSW XML configuration definition..."
$XmlContent = @"
<service>
  <id>jenkins-agent</id>
  <name>Jenkins Inbound Agent</name>
  <description>Maintains persistent WebSocket connection to Jenkins Controller</description>
  <executable>java.exe</executable>
  <arguments>-Xrs -jar "$WorkDir\agent.jar" -url $JenkinsUrl -secret $NodeSecret -name $NodeName -workDir "$WorkDir" -webSocket</arguments>
  <logmode>rotate</logmode>
  <onfailure action="restart" delay="10 sec"/>
</service>
"@

Set-Content -Path "$WorkDir\jenkins-agent.xml" -Value $XmlContent

Write-Host "[*] Step 4: Registering and starting Windows Service..."
& "$WorkDir\jenkins-agent.exe" install
Start-Service -Name "jenkins-agent"

Write-Host "[βœ”] Service installed and running successfully."
Get-Service -Name "jenkins-agent"
PowerShell Output: Status Name DisplayName ------ ---- ----------- Running jenkins-agent Jenkins Inbound Agent
6. Declarative & Scripted Node Targeting: Labels & Usage Modes
Directing pipelines to specific static agents using node labels, boolean label expressions, and configuring exclusive usage modes.
Groovy (Declarative & Scripted Syntax Targeting Static Node Labels)
// 1. DECLARATIVE PIPELINE: Complex Boolean Label Expression
pipeline {
    agent {
        node {
            // Evaluates labels across static inventory:
            // Must have 'linux-x86' AND 'high-spec', but must NOT have 'legacy'
            label 'linux-x86 && high-spec && !legacy'
        }
    }
    stages {
        stage('Compile Heavy C++ Application') {
            steps {
                echo "[*] Assigned to Static Worker: ${env.NODE_NAME}"
                sh 'make -j$(nproc)'
            }
        }
    }
}

// ─────────────────────────────────────────────────────────────────────────────

// 2. SCRIPTED PIPELINE: Allocating Static Node Block
node('windows-build-agent-01') {
    stage('Compile .NET Framework') {
        echo "Running on dedicated Windows node: ${env.NODE_NAME}"
        bat 'msbuild.exe Solution.sln /p:Configuration=Release'
    }
}
Node Usage Modes (Node Settings): β€’ "Use this node as much as possible" (Normal): Jenkins will assign any build to this node as long as its labels match or if a job requests no labels. β€’ "Only build jobs with label expressions matching this node" (Exclusive): Jenkins will NEVER run a job on this node unless the pipeline explicitly requests this node's exact label. Essential for preventing general builds from consuming specialized nodes.
7. Agent Maintenance, Thread Dumps & Troubleshooting Playbook
Diagnostic guide for resolving offline agent events: Disk space thresholds, dropped SSH remoting channels, clock skews, and capturing remote thread dumps.
Troubleshooting Playbook & Diagnostic Commands
DIAGNOSTIC SCENARIOS & REMEDIATIONS:

1. AGENT MARKED OFFLINE: "Disk space is too low"
   β€’ Symptom: Jenkins automatically marks the node offline with a red warning badge.
   β€’ Cause: Jenkins disk space monitor (Node Monitoring) detects available space dropped
     below the configured threshold (default: 1 GB).
   β€’ Remediation:
     - Clear stale workspaces on agent: sudo rm -rf /var/jenkins/workspace/*
     - Purge untracked Docker objects: docker system prune -af --volumes
     - Adjust threshold if needed under: Manage Jenkins βž” Nodes βž” Configure Monitors.

2. ERROR: "Connection refused" or "Authentication failed (Auth cancel)" via SSH:
   β€’ Log: [SSH] Opening SSH connection... Authentication failed.
   β€’ Cause: The public key in /home/jenkins/.ssh/authorized_keys does not match the private
     key registered in Jenkins Credentials, or permissions are too open.
   β€’ Fix: Ensure strict Linux filesystem permissions:
     chmod 700 /home/jenkins/.ssh && chmod 600 /home/jenkins/.ssh/authorized_keys

3. INBOUND AGENT DROPPING CONNECTION (CONNECTION CLOSED / RESET):
   β€’ Symptom: Inbound agent disconnects every few minutes with java.io.EOFException.
   β€’ Cause: A reverse proxy or load balancer (Nginx/HAProxy) in front of Jenkins has a low
     read timeout, terminating idle WebSocket connections.
   β€’ Fix: In Nginx configuration for Jenkins, set:
     proxy_read_timeout 3600s;
     proxy_send_timeout 3600s;

4. CAPTURING REMOTE THREAD DUMPS:
   If an agent appears online but hangs on executing shell commands:
   Navigate to: Manage Jenkins βž” Nodes βž” Click Node βž” "Thread Dump" in sidebar.
   Inspect running threads to identify stuck sub-processes (e.g. hung compiler or deadlock).
Diagnostic CLI Command: To check if the agent JVM is running locally on the worker host: ps -ef | grep remoting.jar sudo journalctl -u jenkins-agent -f -n 50
8. Static Agent Infrastructure Specification & Exam Reference Matrix
A comprehensive reference matrix comparing static agent connection protocols, configuration files, and academic examination definitions for B.Tech students.
Static Agent Technical Specification Reference Matrix
STATIC AGENT SPECIFICATION MATRIX:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ ATTRIBUTE / COMPONENT   β”‚ OUTBOUND SSH AGENT           β”‚ INBOUND JNLP / WEBSOCKET AGENT        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Jar File Distributed    β”‚ remoting.jar (Auto-pushed)   β”‚ agent.jar (Manually downloaded)       β”‚
β”‚ Required Port           β”‚ 22/TCP on Worker Node        β”‚ 443/TCP or 50000/TCP on Controller    β”‚
β”‚ Authentication Type     β”‚ Asymmetric Key (Ed25519/RSA) β”‚ Cryptographic Node Secret (Hex string)β”‚
β”‚ Controller Plugin       β”‚ SSH Build Agents Plugin      β”‚ Built-in WSS / Inbound Remoting       β”‚
β”‚ Remote Directory        β”‚ /var/jenkins (Recommended)   β”‚ Configurable (/var/jenkins or C:\)    β”‚
β”‚ Background Supervisor   β”‚ OpenSSH Server (sshd)        β”‚ Linux systemd / Windows Service WinSW β”‚
β”‚ Network Compatibility   β”‚ Direct routing (Same VPC)    β”‚ Works through NAT, Proxies & Firewallsβ”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ TOP 5 STATIC AGENT GOVERNANCE AXIOMS FOR DEVOPS SREs:                                          β”‚
β”‚ 1. Dedicated Unprivileged User: Always run agents as a non-root 'jenkins' user account.        β”‚
β”‚ 2. Equal Java Runtimes: Ensure agent Java LTS major version matches Controller exactly.        β”‚
β”‚ 3. Enable Exclusive Mode: Set high-spec/specialized nodes to 'Only build jobs matching label'. β”‚
β”‚ 4. Modern WebSockets: Prefer -webSocket over raw TCP 50000 to simplify firewall traversal.     β”‚
β”‚ 5. Automated Service Recovery: Always supervise inbound agents with systemd or WinSW daemons.  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Academic & Professional Standard: Static agent provisioning is the fundamental engineering discipline that allows Jenkins clusters to execute heterogeneous builds across specialized operating systems and physical hardware. Understanding SSH handshakes, inbound WebSocket tunnels, and background process supervision provides the technical foundation for scalable, resilient enterprise continuous integration systems.