An angel of the Lord appeared to Joseph in a dream (Matthew 1:18-25) and told him that the child should be named "Jesus" (transliterated into Latin from the Greek Ἰησοῦς [Iesous]) "because He will save His people from their sins".  Iesous is the closest the Greek language can get to forming the Hebrew name Yeshua.

Luke 3:29, Acts 7:45, and Hebrews 4:8 translate this same word, Iesous, as Joshua... referring to ancient Israelites with that name.