Well, scripture says as much, but there is a lot of difference of opinion as to what this means and how it should be viewed.
I present here some thoughts on the matter.
Jesus came as one of us, he was tempted just like us. Unlike us, he never followed through on temptation, but resisted its efforts and its direction towards causing him to think and act in any way other than as the worthy Son of God.
The temptations arose from within him, not from any external source, other than being tempted when provoked by others, but even so, external temptation still has to pass through the mechanism of assent internally.
Internal temptation was able to arise because he was Son of God but also son of Mary. He was flesh and blood, which “could not enter the kingdom”. And which contained within, the latent ability to question, analyse and deny righteous impulses, and also to allow unrighteous impulses. He allowed the righteous but denied the unrighteous ones, [or ignored both] [there may not have been any righteous ones] refuting them outright, “nipping them in the bud” as being alien to his identity as Son of God.
He had two identities, one as Son of God, and one as son of man. During his life on Earth he lived in the identity of Son of God, denying his identity as son of man. When he went to the garden and the cross, he took on the identity of son of man also, and entered into that identity as well. When He did this, he was subject to the onslaught of all the evil possibilities that could possibly arise from the flesh. His Father was lost to his view as he was attacked by the multiple aspects of man’s sin condition, into conflict with which He was drawn.
His righteousness confronted the unrighteousness of the sinful scenarios being presented to Him, and He destroyed them all and also destroyed the sin producing mechanism within his flesh. In other words, he healed himself of death by destroying the mechanism in “flesh” that causes it, and his body was now perfected. This process was a suffering one. It was effectively the hell that people suffer to some degree now because of guilt, but are to suffer fully according to that guilt at “judgement”. Only the Son of God could survive it. [of himself].
The “bottom line” is that Jesus destroyed his own defective humanity, converting it to that model of original perfection as always intended. Probably then He could not die of old age, but even so, it says He gave up his life, it was not taken from Him. He was already dead before the spear pierced him. [And after he had said “it is finished”].
Jesus body, once perfected, was in line for immortality, seen in resurrection. He was the “first fruits”, and was the “First Resurrection”. Believers who “take part in the first resurrection” are actually by the process of being “born again”, taking part in Jesus, they are “in him” and accounted as being resurrected with Him. They serve as kings and priests now.
[Heb. 2-17. Therefore he had to be made like his brethren in all things…] [See Rom.8-3. ] [ Made in the likeness of sinful flesh (of men) Jesus had the capability of sinning, otherwise there was no purpose in temptation. This means he had an internal weakness, otherwise he would have had the nature of God, incapable of sinning and therefore the whole concept of temptation is invalid, there is no integrity to the argument and the fact of him being “like his brothers in all ways” is pointless.] [If Jesus was God on the cross then he was not identifying with us in any way, only by separating God/Spirit from flesh and the flesh containing a “problem”, does it make any sense.] [the way he “bore our sin” was by becoming as one of us and going to his wrongful death so he could, in the process, right it and cleanse himself of death’s processes.][Our recognition of his love for us in this process is what draws us to him and his righteousness which he now freely shares by his Spirit.][His righteousness overcame indwelling unrighteousness of the flesh].