aptible ssh: ...: Permission denied (publickey).

If you get an error indicating Permission denied (publickey) when using aptible ssh (or aptible db:tunnel, aptible logs), follow the instructions below.

This issue is caused by a bug in OpenSSH 7.8 that broke support for client certificates, which Aptible Deploy uses to authenticate Ephemeral SSH Sessions sessions.

This only happens if you installed the Aptible CLI from source (as opposed to using the Aptible Toolbelt).

To fix the issue, follow the Aptible CLI installation instructions and make sure to install the CLI using the Aptible Toolbelt package download.