"And Moses spake unto the LORD, saying, Let the LORD, the God of the spirits of all flesh, set a man over the congregation, Which may go out before them, and which may go in before them, and which may lead them out, and which may bring them in; that the congregation of the LORD be not as sheep which have no shepherd." (Numbers 27:15-17)
The Lord answered Moses' request in these verses by designating Joshua to lead the children of Israel. Joshua would be their new "pastor" (or "shepherd"), guiding and protecting them in all their ways. In reality, of course, the Lord Himself was their shepherd (Psalm 23:1) while Moses and Joshua had been undershepherds.
The name Joshua, of course, is the same as Jesus, and Joshua, as undershepherd, is a beautiful type of the Lord Jesus Christ, "that great shepherd of the sheep" (Hebrews 13:20). Jesus said: "I am the door: by me if any man enter in, he shall be saved, and shall go in and out, and find pasture" (John 10:9). The shepherd of the sheep is also the door of the sheep, taking his own stand in the very entrance to the fold. The sheep cannot leave the fold, nor intruders enter the fold, because he is there at the door of the fold. The sheep come into the fold for rest and fellowship, as well as for salvation, then they go out of the fold for work and service.
Joshua was the shepherd of Israel, but Jesus is our own Good Shepherd, who "giveth his life for the sheep" (John 10:11). "Other sheep I have," He said, "which are not of this fold: them also I must bring, and they shall hear my voice; and there shall be one fold, and one shepherd" (John 10:16). All who are truly "the sheep of his pasture" should "enter into his gates with thanksgiving, and into his courts with praise" (Psalm 100:3-4) each day before venturing out, with Him, into the world. HMM