EMZETT.
Login

SSH: Permission denied (publickey)

In short: The server does not accept the specified SSH key.

In more detail: Login by public key failed.

In Depth

Possible causes

  • Public key missing in authorized_keys.
  • Wrong rights on ~/.ssh.
  • Wrong user name.

Solutions

  1. Look at the details with ssh -v.
  2. Set permissions: chmod 700 ~/.ssh, chmod 600 ~/.ssh/authorized_keys.
  3. Specify the right key with -i.

See also: SSH, Public Key, Private Key