Post

SSH for WPEngine Cheatsheet

SSH config

WP Engine requires a specific key per connection type. Add both hosts to ~/.ssh/config.

SSH Gateway (terminal access)

User and hostname are on the site’s Overview screen in WP Engine admin. You need to build fill out the values of your ssh config using the elements of the ssh login provided on the overview wpengine screen. Furthermore, add the part which tells ssh which key you want to use.

1
2
3
4
5
6
Host ht
  User username
  Hostname hostname.ssh.wpengine.net
  PreferredAuthentications publickey
  IdentityFile ~/.ssh/wpengine_ed25519
  IdentitiesOnly yes

Git Push

1
2
3
4
Host git.wpengine.com
  User git
  IdentityFile ~/.ssh/wpengine_ed25519
  IdentitiesOnly yes

Troubleshooting

Check which key SSH is using

1
ssh -v git@git.wpengine.com info 2>&1 | grep "Offering"

If it shows the wrong key (e.g. id_rsa), your ~/.ssh/config is missing the git.wpengine.com host entry above.

Verify your key is registered

1
ssh git@git.wpengine.com info

Returns a list of environments your key has access to. If empty, the key hasn’t been added to any environment’s GitPush section, or it hasn’t propagated yet (can take up to 45 minutes).

Key not showing after adding

  • Key must be added under GitPush in WP Engine admin for each environment separately (production, staging, dev)
  • Adding it to your account profile SSH Keys does not grant Git Push access
This post is licensed under CC BY 4.0 by the author.