So here is why the essence of both quotes is the same, not the exact message but the broad implication — i.e. self awareness. The ultimate wisdom i agree is probably knowing that we know nothing, i.e. being self aware of what you are and how much you know. To me, the biggest thing a person should be aware of is their true worth / value / knowlwdge and their own.perception of it and they should fully match. If my true knowledge is 50 and I think it is 70 that is a bigger problem than vice versa and ideal is both.being fully in synch.
The knowing nothing part is philosophical and I get the focua in that Socrates / Tolstoy quote is on the humility of knowing how tiny we are in the bigger scheme of things and how insignificant our knowledge is in the infinite pool that is out there, but it also eventually boils down to self awareness. And hence in my view the end message is the same i.e. about self awareness.