WPCloud Deploy Documentation

Changing SSH Keys For A Cloud Provider

When WPCD wants to connect to a server it looks in the WPCD SETTINGS screen, under the CLOUD PROVIDERS tab, to get the login information.  It usually needs the private portion of the SSH keypair for the server in order to login but with some providers it might also need the name of the sudo user.

If you change the private key or public key in that screen, then ALL new AND existing servers will start to use the new private key information.

For existing servers, this can be an issue unless you update their root/sudo user with the new public key.  If you have a lot of servers, this can be a lot of work.  So, unless you have a security issue that require you to change your keys, that’s probably not the best approach.

There is an alternative that was introduced in WPCD Version 4.2.5 and later.  You can provide private key information on a server-by-server basis while utilizing the key information in the SETTINGS->CLOUD PROVIDERS tab for all other servers.

This means that, depending on what you need, you can either:

  1. Change the PUBLIC and PRIVATE ssh keypair in the WPCD SETTINGS->CLOUD PROVIDERS tab which will apply to all new servers.  Then update the private key information in the server KEYS tab for all existing servers. Or…
  2. Add the PRIVATE ssh key for one or more servers under the servers’ KEYS tab for a select few servers.  Servers that are not updated that way will continue to use the data under the WPCD SETTINGS->CLOUD PROVIDERS tab to login.

Share: