How to Update Node Server Credentials in Jenkins
Introduction
When managing CI/CD pipelines, it’s common for Jenkins to deploy applications (like Node.js) to remote servers via SSH. Over time, server credentials such as SSH keys or passwords may change — and if Jenkins isn’t updated, your deployments will start failing.
In this guide, we’ll walk through how to update Node server credentials in Jenkins safely and correctly, without breaking existing jobs.
Prerequisites
1. Jenkins installed and accessible via the web UI.
2. Admin privileges on Jenkins.
3. Updated SSH or login credentials for your Node.js server.
4. Access to your Jenkins server (via SSH or web dashboard).
Step 1:

Access your Jenkins dashboard using your admin credentials:
| $ https://jenkins.example.com |
Once logged in, navigate to “Manage Jenkins” → “Credentials”.


Step 2:
In the Credentials section:
1. Open the relevant domain (for example, “(global)” or “SSH credentials”).
2. Find the credential currently used for connecting to your Node.js server.
You can verify it by checking:
1. The ID used in your Jenkins pipeline (found in your Jenkinsfile or build configuration).
2. The type (SSH Username with Private Key, Username and Password, etc.).

Step 3:
If you just need to replace an expired private key or password:
- Click the credential ID.
- Choose “Update” or “Replace”.
- Paste the new private key or update the password.
- Save your changes.

Step 4:
In the Jenkins dashboard, go to Build Executor Status.
Click on the node you created, and then click Launch agent.
If successful, you’ll see:
| Connecting to node-server-prod via SSH Connection established. |
If it fails, check the following:
1. The SSH key permissions on your Node server (~/.ssh/authorized_keys).
2. Firewall or network access from the Jenkins host.
Conclusion
Updating your Node server credentials in Jenkins is a quick but essential maintenance task.
It ensures your CI/CD pipeline continues to deploy smoothly and securely without interruptions.
By following these steps — updating credentials, verifying pipeline configuration, and testing connectivity — you’ll keep your Jenkins-to-Node integration running seamlessly.
