Find file History
Latest commit 9b72ee0 Apr 26, 2017 @EricJizbaMSFT EricJizbaMSFT Use 'azureuser' instead of 'admin' by default for devops templates
'admin' is a reserved name and is thus invalid

Jenkins on Azure (SSH key) Build Status

This template allows you to host an instance of Jenkins on a DS1_v2 size Linux Ubuntu 14.04 LTS VM in Azure. For more information regarding this template and how it secures Jenkins on Azure, refer to

A. Deploy Azure Jenkins VM

  1. Click "Deploy to Azure" button. If you haven't got an Azure subscription, it will guide you on how to signup for a free trial.
  2. Enter a valid name for the VM, as well as a user name and ssh public key that you will use to login remotely to the VM via SSH.
  3. Remember these. You will need this to access the VM next.

B. Setup SSH port forwarding

By default the Jenkins instance is using the http protocol and listens on port 8080. Users shouldn't authenticate over unsecured protocols!

You need to setup port forwarding to view the Jenkins UI on your local machine.

If you are using Windows:

Install Putty or use any bash shell for Windows (if using a bash shell, follow the instructions for Linux or Mac).

Run this command:

putty.exe -ssh -i <path to private key file> -L 8080:localhost:8080 <User name>@<Public DNS name of instance you just created>

Or follow these manual steps:

  1. Launch Putty and navigate to 'Connection > SSH > Tunnels'
  2. In the Options controlling SSH port forwarding window, enter 8080 for Source port. Then enter for the Destination. Click Add.
  3. Navigate to 'Connection > SSH > Auth' and enter your private key file for authentication. For more information on using ssh keys with Putty, see here.
  4. Click Open to establish the connection.

If you are using Linux or Mac:

Run this command:

ssh -i <path to private key file> -L 8080:localhost:8080 <User name>@<Public DNS name of instance you just created>

C. Connect to Jenkins

  1. After you have started your tunnel, navigate to http://localhost:8080/ on your local machine.
  2. Unlock the Jenkins dashboard for the first time with the initial admin password. To get this token, SSH into the VM and run sudo cat /var/lib/jenkins/secrets/initialAdminPassword
  3. Your Jenkins instance is now ready to use! You can access a read-only view by going to http://< Public DNS name of instance you just created >.
  4. Go to if you want to build/CI from this Jenkins master using Azure VM agents.