Install Sun Java:
sudo add-apt-repository ppa:sun-java-community-team/sun-java6 sudo apt-get update sudo apt-get install sun-java6-jdk
Ensure a SSH server is installed
sudo apt-get install openssh-server
Create a new Jenkins user and create the /var/jenkins directory – this will be our working directory.
sudo useradd -m jenkins sudo mkdir /var/jenkins sudo chown jenkins:jenkins /var/jenkins
Generate a public / private keypair and set the public key as an allowed host
ssh-keygen #Enter file in which to save the key (/root/.ssh/id_rsa): /var/jenkins/private.key #Do not enter a Passphrase #You should now have two files in /var/jenkins: a private.key and a private.key.pub, we want to cat the public key into our authorized keys file su jenkins cat private.key.pub > ~/.ssh/authorized_keys
The private key must be transfered to an accessible directory on the primary build server. Eg: C:\private.key or a more suitably protected location.
Login to your Jenkins install, select the plugin manager and install the SSH Slaves plugin. After restarting Jenkins to complete the install, click on Manage Jenkins followed by Manage Nodes and create a new dumb node with a name of your liking.
Remote FS Root: /var/jenkins
Launch Method: Launch slave agents on Unix machines via SSH
Host: <Ubuntu Hostname>
Private key file: File of the private key (eg: C:\private.key)
When you press save, the slave should attempt to start automatically. If the start fails, check the log provided by jenkins and the server log.