- Is it possible to change ssh user to access to the controllers/workers?
- Is it possible to change
ec2-user/ubuntuto some other account, Which config item do we need to change?
- When CJE is being installed, the installer uses
ec2-user/ubuntu, Can this be changed?
- CloudBees Jenkins Enterprise - AWS/OpenStack/Anywhere
In order to have an user different than default (
ec2-user/ubuntu), you need to customize the AMI to have your new user on workers restart/create. This user has to have sudo permissions without a password
In a not initialised cluster (at cluster-init operation)
After making the
cje prepare cluster-init operation, you have to edit the cluster-init.config file to set your
ssh_user on each section of the file like this:
[controller] ... ssh_user = USER_NAME ... [worker] ... ssh_user = USER_NAME ... [storage] ... ssh_user = USER_NAME ...
When you make the
cje apply, the new user will be used to access by SSH
In a cluster initialised
.dna/project.config file, you have the ssh_user option configured for your Controllers/Workers you can change it for your user, it has to be in controllers/workers and has to have sudo permissions without a password and should have in ~/.ssh/authorized_keys the
ssh_user = USER_NAME
after you change it you have to make a
cje upgrade --config-only --force to update the