Adding Slave Servers (non-win)


This article will cover how to add a slave server.  This will not cover how to add windows based slaves.  It will also have a EC2 server in mind but can be applied to any non-windows server.


First off you will want your new slave server to have ssh access (port 22).

Setup Steps

Slave Machine

# init: [Slave] Create Account for Autobuild

slave:~$ sudo adduser jenkins master


# Step 1: Create private key and public key

slave:~$ ssh-keygen -t rsa -C "The access key for the slave"

(note: Enter passphrase)


private key: id_rsa         # copy to master

public key:    # copy to slave (.ssh/authorized_keys)


# Step 2: Setup Authorized key

slave:~$ cat > ~/.ssh/authorized_keys


Jenkins Master Machine

# Step 3: Setup the Credential key

[Manage Jenkins] -> [Manage Credential] -> [Add Credentials]:

Select: SSH Username with private key


# you are on the slave

(a) copy the private key

   slave:~$ cd .ssh;cat id_rsa    


# you are on the Jenkins master

(b) paste to the jenkins master board

     Private key:

     Enter directly: <private key ascii>

# Step 4: Create Node

[Manage Jenkins] -> [Manage Node] -> [New Node]



Remote FS root: <jenkins home>

Host: <slave ip>

Credentials: <select credentials>


This was adapted from the guide found at

Have more questions? Submit a request


Please sign in to leave a comment.
Powered by Zendesk