SSH in most system by default allow public key login. You can disable it with these simple steps if you somehow need to;

  1. Set PubkeyAuthentication to no in /etc/ssh/sshd_config

    PubkeyAuthentication no
  2. Reload or restart SSH