0
0
Jenkinsdevops~3 mins

Why Agent connection methods (SSH, JNLP) in Jenkins? - Purpose & Use Cases

Choose your learning style9 modes available
The Big Idea

What if your computer could connect and work for you automatically, without you typing a thing?

The Scenario

Imagine you have many computers that need to run tasks for your project. You try to connect to each one by typing commands manually every time to start the work.

The Problem

This manual way is slow and tiring. You might forget steps or make mistakes. It's hard to keep track of all computers and their connections, especially when they are far away or behind firewalls.

The Solution

Agent connection methods like SSH and JNLP let Jenkins connect automatically and securely to these computers. They handle the connection details so you don't have to do it by hand every time.

Before vs After
Before
ssh user@remote-machine
start-task-command
After
jenkins-agent --connect-via=ssh
jenkins-agent --connect-via=jnlp
What It Enables

This makes running tasks on many computers easy, fast, and reliable without manual effort.

Real Life Example

A company uses Jenkins agents to build software on different servers worldwide. SSH connects to secure servers inside the company network, while JNLP connects to agents behind firewalls without extra setup.

Key Takeaways

Manual connections are slow and error-prone.

SSH and JNLP automate secure agent connections.

This saves time and makes managing many computers simple.