Local Connect autogenerates new SSH key every time I connect to WPE host

What issue or error are you experiencing?

Anytime I connect to a new host in Local for Local Connect, it appears a new SSH key gets autogenerated. Using Local Connect with WP Engine, it then registers this generated SSH key to my WP Engine SSH keys profile every time and I receive an email notification from WPE. Is there any way I can explicitly use a single SSH key that I already have registered with WPE for all Local sites? It becomes troublesome when my clients will receive the SSH notification email every time I connect to their host account.


What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc

  1. If already connected to a WP Engine host account in Local Connect, disconnect from this host.
  2. Select “+ Add another host” and enter API credentials for WP Engine host account.
  3. Email regarding “A new public key was added to your profile” received.
  4. Repeat this process and you will each time add a new SSH key to your WPE account.

System Details

  • Local Version:
    Version 8.1.0+6514
  • Operating System (OS) and OS version:
    Windows 10

Local Logs

Attach your Local Logs here (Help Doc - Retrieving Local’s Log)


Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

Hey @amida - thanks for reaching out!

Currently, this is expected behavior - when you disconnect from WPE and log back in, a new SSH key is generated. We’re working on improving this right now, actually!

If you want, you can delete the old SSH keys that are being unused in the Portal - they’re essentially “abandoned” and won’t be used again.

I’m curious on the use case here, though - are you disconnecting and reconnecting to WP Engine frequently?

1 Like

Hey Austin,

Thank you for your response! That’s great to hear you are working on this. To answer your question, yes I have to frequently switch to different WP Engine accounts. All the sites ultimately get pulled into the same Local install but the sites can live on different WP Engine accounts which requires the frequent switching any time I need to use Local Connect.

1 Like

Thanks for the response @amida! That makes sense.

We hear from users about the need to switch between accounts like this often. Have you tried adding your WP Engine user to the other accounts so that you don’t need to switch?

For example…

  1. Log into your Client’s Account at https://wpengine.com
  2. On the left sidebar go to “Users”
  3. Under “Users”, click on “Account users”
  4. Click on “Invite Account User”
  5. Enter the email you wish to use for your User Account (this User Account will represent you, not your client)
  6. Approve the confirmation email and create a password.
  7. You can now log out of your client’s WP Engine account, and use your new account to log in to WP Engine.

Now that you have a User Account of your own, you can manage all of your Client Accounts with it. To add more Client Accounts, repeat steps 1-5 for each new client. Now, you can log into WP Engine from LocalWP using your own User Account, and have access to all of your Client’s Accounts without needing to log-in or log-out.

This solves the problem of having to log in and out, at least, by giving your user access to the accounts you need access to.

I’m curious how you feel about a workflow like this vs switching between accounts like you have been. Is this better? Worse?

Thanks @austinwendt!

Yes, I already do this often for client accounts that I work directly with. In this case, I can use my own WP Engine account and have the client’s add my user account to their account. However, I also have agencies that I partner with that have workflows where they would rather have me use an account associated with an email address they have created for me. In these cases, I have to switch between the accounts.

Would you be able to provide some details on the improvement of the SSH workflow that is being worked on? For one, as I mentioned it would be nice to have the ability to opt in to explicitly use an already registered SSH key set if we chose on a site to site or all sites basis; otherwise defaulting to auto generating the SSH key as it currently does. The other would-be-nice will be some mechanism to allow associating multiple accounts into a single Local instance so that it eliminates the need to sign in and out or to switch between accounts for users with multiple accounts.

1 Like

That makes sense to me - how often do you see agencies prefer you use an email they’ve created for you vs just inviting your account as a user? 50/50, or some other split?

You bet. There’s a number of improvements coming, most notably:

  1. We’re switching to an Okta/OAuth based flow instead of generating and copy-pasting API keys. “Login” will take you to the browser where you’ll login to WP Engine (or skip if you’re already logged in!) and then send the auth token back to Local. This will be much faster than the previous workflow.
  2. Local will use a single SSH key (and handle creating it and registering it for you) when using Connect - no more endless list of SSH keys hanging around in your Portal.
  3. Logging out from WP Engine inside Local will clean up the SSH keys both on your machine as well as in the WP Engine user portal.

Technically, this still doesn’t address your original question of a new key being generated on login and an email being sent - that’s something we can look into (maybe we don’t regenerate, or maybe just suppress the email when we know it is coming from Local vs something a user did manually). We’re also exploring the idea of an account switcher that would allow users to toggle between profiles in the Connect experience… still TBD on what that could look like.

#1 (the new, faster Okta/OAuth flow) is complete and should be launching to Beta next week, so coming quickly!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.