1. SSH
Connection direction: Master actively connects to Agent
Requirements:
- Master can connect directly to Agent over SSH
- The SSHD service is running on Agent
- Jenkins has the SSH Credentials Plugin and the SSH Build Agents plugin installed
2. JNLP
Connection direction: Agent actively connects to Master
Requirements:
- Agent can reach Master
- Agent needs a JVM environment to run
- Master needs to expose port 50000 (the default) for Agent communication
Port 50000 is the service port of the Jenkins Master; no other service program needs to be run for it.
3. WebSocket
Connection direction: after Agent connects to Master, communication can be bidirectional
Requirements:
- Agent can reach Master
- Agent needs a JVM environment to run
The WebSocket method reuses the URL of the Jenkins management page for communication, so Agents can be connected without using port 50000.
