Fix Permission denied (publickey) when connecting an AI coding tool Print

  • permission denied, publickey, ssh, troubleshooting
  • 0

Quick answer

This error usually means the server did not accept a key for the requested user. First test the same connection outside the AI tool. A failed SSH login is an authentication or account-access issue, not evidence that the website code needs to change.

Before you start

Have the correct server hostname, SSH port, cPanel username, local private-key path, and public fingerprint. Confirm that the account allows SSH and that the matching public key is authorized in that account.

What to do

  1. Compare the username and host with the service details. The Client Area email address is usually not the SSH username.
  2. Check cPanel's public-key authorization status and compare the fingerprint with the local key. Import and authorize the correct .pub key if necessary.
  3. Specify the intended IdentityFile in a dedicated SSH alias. If many agent keys are offered, use IdentitiesOnly yes for that alias.
  4. Inspect a local verbose SSH attempt when needed, but redact usernames, IPs, paths, and other unnecessary data before sharing its output. Never include a private key or passphrase.

Check the result

A normal terminal login should succeed as the intended account before the assistant retries. Then request a read-only directory check rather than an immediate deployment.

If something does not work

If the server reports that shell access is disabled, ask support about the service capability. Repeated login attempts or disabling host-key checks will not repair a missing shell entitlement.

Related help

Official references

Reviewed October 31, 2026. Interfaces, vendor availability, and account features can change. Check your current account before making changes.


Was this answer helpful?

« Back