דרש רב עוירא בשכר נשים צדקניות שהיו באותו הדור נגאלו ישראל ממצרים ב
§ Rav Avira taught: In the merit of the righteous women that were in that generation, the Jewish people were redeemed from Egypt.
תנו רבנן ארבע נשים יפיפיות היו בעולם שרה (ואביגיל רחב) ואסתר. . . . רבי יצחק כל האומר רחב רחב מיד ניקרי א"ל רב נחמן אנא אמינא רחב רחב ולא איכפת לי אמר ליה כי קאמינא ביודעה ובמכירה
the Sages taught: There were four women of extraordinary beauty in the world: Sarah, and Abigail, Rahab, and Esther. . . . . Rabbi Yitzḥak said: Anyone who says Rahab, Rahab, immediately experiences a seminal emission due to the arousal of desire caused by Rahab’s great beauty. Rav Naḥman said to him: I say: Rahab, Rahab, and it does not affect me. Rabbi Yitzchak said to Rav Naḥman: When I said this, I was specifically referring to one who knows her personally and recognizes her beauty. Only for one who has met Rahab in person is the mere mention of her name capable of arousing lust.
Rabbi Elizer said: Rahav had heard about the parting of the Sea of Reeds, as it is stated: "And it came to pass, when all the kings of the Amorites heard [. . . how YHWH had dried up the waters of
the Jordan before the children of Israel]" (Joshua 5:1). Rahav the prostitute said to the messengers of Joshua "For we have heard how YHWH has dried up the water of the Sea of Reeds. (Joshua 5:1)
On a separate matter, we might also ask the question of why scripture first states: "They had no more spirit left in them (Joshua 5:1)" and then afterwards states: "no man was able to stand any more with spirit" (Joshua 2:11)
דבר אחר בחדש השביעי פתח והוא ישפוט תבל בצדק ידין לאומים במישרים (תהלים ט' ט') מהו במישרים אמר ר' אלכסנדרי דן את האומות במישרים שלהם ברחב ביתרו ברות כיצד אומר לאומות העולם למה לא קרבת אצלי והוא אומר שהייתי רשע מוחלט והייתי מתבייש והוא אומר לו וכי יותר היית מרחב שהיה ביתה בקיר החומה והייתה מקבלת את הליסטים ומזנה מבפנים וכשנתקרבה אצלי לא קיבלתיה והעמדתי ממנה נביאים וצדיקים
Pesikta Rabbati 40:3
"And He will judge the world in righteousness, He will minister judgment to the peoples with uprightness." [Psalms 9:9] What is the meaning of "uprightness"? Rabbi Alexsandri said: He judged the nations with the uprightness they [possessed]. [For example] Rahab, Jethro and Ruth. How will He speak to the nations of the world? [He will say]: "Why did you not bring yourself closer to me?" And he will say: "I was a utterly evil person and I was embarrassed." And He said to him: "You were no more so than Rahab whose house was in the city wall and she received robbers and prostituted with them within. Nevertheless, she drew close to me and did I not welcome her and raise up prophets and righteous people from her?"
(ה) פסקא יג אות ה (ה) ר' שמואל בר נחמן פתח אם לא תורישו את יושבי הארץ מפניכם וג' (במדבר לג נה) אמ' הק' לישר' אני אמרתי לכם כי החרם תחרימם החתי והאמרי (דברים כ יז) ואתם לא עשיתם כן אלא ואת רחב הזונה ואת בית אביה ואת כל אשר לה החיה יהושע (יהושע ו כה) הרי ירמיה בא מבני בניה של רחב הזונה ועוש' לכם דברים של סיכים בעיניכם ולצנינים בצידכם לפיכך צריך הכת' דברי ירמיהו (ירמיה א א
Rabbi Shmuel Bar Nachman expounded on the verse: " But if you do not dispossess the settled-folk of the land from before you, those who are left of them shall be as barbs in your eyes, as spines in your sides; they will assault you on the land that you are settling in, and it shall be: as I thought to do to them, so I will do to you! (Numbers 33:56). The Holy One also said to Israelites "You are to devote-them-to-destruction, yes, destruction, the Hittite, the Amorite, the Canaanite, the Perizzite, the Hivvite and the Yevusite, as YHVH your God has commanded you." But you did not do as I commanded, rather Rahav the prostitute, her father's house, and all of her posesions Yehoshua let live (Joshua 6:25). Therefore Jeremiah, who came from the lineage of Rahav the prostitute, said: “stings in your eyes and thorns in your sides” (which is the punishment with which God threatened Israel if they did not dispossess the inhabitants of the land)
רַבִּי בּוֹן אָמַר צַדִּיקִים הָלְכוּ לְשָׁם וַיָּבוֹאוּ, כְּגוֹן יוֹסֵף לְאָסְנַת, יְהוֹשֻׁעַ לְרָחָב, בֹּעַז לְרוּת, משֶׁה לְחוֹבָב. אָמַר רַבִּי אַחָא אֵין זֶה הֶבֶל, אֶלָּא שֶׁאֵין הַבְּרִיּוֹת בָּאִין וּמִתְקַדְּשִׁין לְתַחַת כַּנְפֵי הַשְּׁכִינָה.
Rabbi Bon lists a number of converts who became a part of the families of Israelite leaders: Joseph and Aesnat, Joshua and Rachav, Boaz and Roth, Moses and Chovev. Rabbi Acha says these relationships have value, and that they are sanctified into existence under the wings of Shechinah.
ויסב חזקיהו פניו אל הקיר באיזה קיר נשא עיניו ריב"ל אמר בקיר של רחב נשא עיניו (יהושוע ב) כי ביתה בקיר החומה אמר לפניו רבש"ע רחב הזונה שתי נפשות הצילה לך ראה כמה נפשות הצלת לה הדא היא דכתיב (יהושוע ו) ויבאו הנערים וגו' תני ר"ש בן יוחי אפי' היתה במשפחתה מאתים אנשים והלכו ודבקו במאתים משפחו' כולהם ניצולו בזכותה אבותי שקירבו לך כל הגרים האילו על אחת כמה וכמה
Hezekiah turned his face to the wall and prayed to the YHWH. He lifted his eyes, Rabbi Yehoshua Ben Levi says this is the wall of Rahav to which he directs his eyes. Her home was in the outer wall of the city. Hezekiah said: "Rahav the prostitute saved two lives for you, and because of her merit, you saved numerous lives, as it is written. "Only Rahav the harlot and her father’s family were spared by Joshua, along with all that belonged to her." Rabbi Shimon Ben Yochai taught that there were over two hundred people in her family, and they clung two two hundred more families, who were saved by her merit. Will You not save me, whose forefathers all the more so brought many converts to You?” Hezekiah’s prayer was accepted.
דבי אליהו זוטה כב:א
דבר אחר גדולה תשובה יותר מן התפלה, שכל התפלה שנתפלל משה רבינו לא קיבל ממנו להכניסו לארץ ישראל, אבל רחב הזונה נתקבלה בתשובה
Eliyahu Zuta 22:1
A separate matter. Teshuva (repentance) is greater than prayer. For even the the prayer that Moses our Teacher prayed for his entrance into the promised land was accepted by God. But Rahav the prostitute, her teshuvah (repentance) was accepted.