Passer au contenu principal

Advanced guide on setting up a standby node using a SSH keypair

Dans Node Management
Liste des auteurs
Publié: 11 janv. 2023|Dernière mise à jour: 12 janv. 2023
Question

How do I add a standby node to my cluster using the ssh key method?

Please be aware this method is for advanced system admin users and we do support password auth for the initial adding of a standby node. Once the node is added the cluster will generate and configure key pairs itself.

Note

Both the CLI and GUI methods require command line input, the GUI method downloads the private key to use in the 'add standby node' interface rather than using the command in step 5. All other steps are the same.

  1. On your main node generate a new ssh key that uses the ecdsa authentication method

ssh-keygen -t ecdsa
copy

This will prompt for a location and passphrase, as this key is only going to be used temporaraly, you can leave these blank/default.

  1. Cat out the public key and copy the contents to a notepad file or similar

cat /root/.ssh/id_ecdsa.pub
copy
  1. On the server that is being added as a standby node, add the public key to the deskpro_admin users authorized keys file

echo [public key] >> /home/deskpro_admin/.ssh/authorized_keys
copy
  1. On the main node test the ssh connection works by trying to open a ssh tunnel using the generated key

ssh deskpro_admin@[ip address] -i /root/.ssh/id_ecdsa
copy

If the session connects correctly you can close the tunnel then add the node to the cluster/

  1. To add the node to the cluster the command is:

opc cluster node add --ssh-host [ip address] --ssh-user deskpro_admin --ssh-key-path /root/.ssh/id_ecdsa
copy

image.png

  1. Once the node has been added to the cluster you can check the status with

opc cluster node list
copy
  1. Once everything is working correctly you can then remove the generated private key

UtilePeu Utile
page suivanteFailover methods
page précédenteI want to re-initialize my cluster

Veuillez vous connecter ou vous enregistrer pour soumettre un commentaire.