The installation script requires SSH with an authentication key. If you do not have this, follow the procedure below to setup a “promote” user with an authentication key.
The username does not have to be "promote." Permissions are what is most important.
Run these commands on all the nodes:
- SSH onto the machine with sudo privileges.
- Add the promote user:
adduser promote
- Create a password:
passwd promote
- Add the user to the wheel:
usermod -aG wheel {promote}
- Make this user have passwordless sudo
- become root:
sudo su
- edit the sudoers file by running the command:
visudo
- Below the comment
“# Same thing without a password
, add the line promote ALL=(ALL) NOPASSWD: ALL
We now need to add an authorization key that we can use to authorize our SSH sessions. If you are using a Windows machine to setup these servers, you will need bash - we recommend Git Bash.
The SSH key must be added to each machine in the current cluster, as well as any new machines before they are added to the cluster.
- Create a new public/private key pair on your machine:
ssh-keygen
- When prompted for a save location, save to a known location. When prompted for a password, leave the field blank.
- SSH onto the promote machines profile.
- Make a .ssh directory in the home folder for your user, for the case of the promote user the command is:
mkdir /home/promote/.ssh/
- Create a file in the home directory for your user called authorized_keys using the command:
touch /home/promote/.ssh/authorized_keys
- Copy the contents of the public key from your laptop.
- Open the authorized_keys file paste the public key from your machine into the file:
vi /home/promote/.ssh/authorized_keys
- Update the permissions on the .ssh folder and the authorized_keys file:
chown -R promote:promote /home/promote/.ssh
chmod 700 /home/promote/.ssh
chmod 600 /home/promote/.ssh/authorized_keys
- Ensure that this works from your machine by running the command:
ssh -i “/path/to/key” promote@IP