Debugging SSH Access

Debugging SSH Access

by

One of the problems i face when initially trying to access one of my servers hosted in Digital Ocean
is SSH.

Permission denied (publickey).

This stackoverflow answer was vey helpful.

  1. Run ssh root@address -vvv to see full logs
  2. configure a section for each server like so
Host SERVERNAME
Hostname ip-or-domain-of-server
User USERNAME
PubKeyAuthentication yes
IdentitiesOnly yes
IdentityFile ./path/to/key
  1. Use IdentitiesOnly yes to limit the authentication to use the single, specified key.

Happy debugging.