Debugging SSH Access

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
  3. Use IdentitiesOnly yes to limit the authentication to use the single, specified key.

Happy debugging.


73 Words

2020-03-09 10:40 +0000