Introduction
Jenkins uses agents to run tasks on different machines. Agents connect to the main Jenkins server using methods like SSH or JNLP. These methods help Jenkins distribute work safely and efficiently.
When you want to run builds on a remote Linux server using secure shell access.
When you need to connect an agent behind a firewall that cannot accept incoming SSH connections.
When you want to add a Windows machine as an agent without setting up SSH.
When you want the agent to initiate the connection to Jenkins to avoid network restrictions.
When you want to manage agents dynamically with Jenkins controlling their lifecycle.