Testing the SSH connection to an agent

2 minute readSecurity

You can use SSH to protect the connection between your controllers and agents. CloudBees CI provides a Test SSH Connection option that lets you validate the SSH connection details, to ensure they are correct.

The Test SSH Connection option does not establish the SSH connection between the controller and agent. Since the agent is on lease to a controller, the controller has to initiate the SSH connection. Instead, CloudBees CI tests the connection details to ensure that the operations center can make an SSH connection to the agent. The operations center makes a quick connection to the agent, and then disconnects, without executing any code or changing any settings. Then, CloudBees CI provides you with a message indicating either success or failure.

If the operations center is able to successfully make an SSH connection to the agent, you can assume that the connection details are correct, and that the controller is also able to form an SSH connection to the agent.

You can use this option to test the SSH connection for either shared agents or static agents.

Validating the SSH connection between a shared agent and the operations center

Complete the following steps to validate the SSH connection between a shared agent and the operations center.

This procedure details validating the SSH connection between an existing shared agent and the operations center. You can also validate the SSH connection when you configure a new agent.
  1. On the operations center dashboard, select the name of the agent.

  2. In the left navigation pane, select Configure to access the agent’s details page.

  3. In the Launch method section, select Advanced.

    Advanced option
    Figure 1. Advanced option
  4. Select Test SSH Connection.

    Test SSH Connection option
    Figure 2. Test the SSH connection

    A message displays indicating whether the SSH connection was successful.

    Success message
    Figure 3. Success message

Validating the SSH connection between a static agent and the operations center

Complete the following steps to validate the SSH connection between a static agent and the operations center.

This procedure details validating the SSH connection between an existing shared agent and the operations center. You can also validate the SSH connection when you configure a new agent.
  1. In the left navigaton pane, select Manage Jenkins.

  2. Select Manage Nodes and Clouds.

  3. Click on the name of the agent, and then select Configure.

  4. In the Launch method section, select Advanced.

    Advanced option
    Figure 4. Advanced option
  5. Select Test SSH Connection.

    Test SSH Connection option
    Figure 5. Test the SSH connection

    A message displays indicating whether the SSH connection was successful.

    Success message
    Figure 6. Connection successful