Normally, two witnesses are required to be legitimate (Deuteronomy 17:6; 19:15) While Jesus had the forerunner of John the Baptist, both are actually individual testimonies.
Jesus acknowledges the issue and the Pharisees attack him for it, but Jesus points to the confirming works and therefore to God, the Father as the second witness.
“I can do nothing on my own. As I hear, I judge, and my judgment is just, because I seek not my own will but the will of him who sent me. If I alone bear witness about myself, my testimony is not true. There is another who bears witness about me, and I know that the testimony that he bears about me is true. You sent to John, and he has borne witness to the truth. Not that the testimony that I receive is from man, but I say these things so that you may be saved. He was a burning and shining lamp, and you were willing to rejoice for a while in his light. But the testimony that I have is greater than that of John. For the works that the Father has given me to accomplish, the very works that I am doing, bear witness about me that the Father has sent me.
The statement “greater than John” means he is not relying simply on the prophetic testimony. Rather it is the Father whose testimony is confirming.
So the Pharisees said to him, “You are bearing witness about yourself; your testimony is not true.” Jesus answered, “Even if I do bear witness about myself, my testimony is true, for I know where I came from and where I am going, but you do not know where I come from or where I am going. You judge according to the flesh; I judge no one. Yet even if I do judge, my judgment is true, for it is not I alone who judge, but I and the Father who sent me. In your Law it is written that the testimony of two people is true. I am the one who bears witness about myself, and the Father who sent me bears witness about me.”
John the Evangelist, in fact organizes this Gospel around seven confirming signs. The second of which is in our passage (John 4:46-54) and confirms His omnipotence by healing a person from a distance.