The spies and the task:
וְכֵן אַתְּ מוֹצֵא בְּסֻכָּה שֶׁשָּׁנִינוּ שֶׁשְּׁלוּחֵי מִצְוָה פְּטוּרִין מִן הַסֻּכָּה, שֶׁאֵין לְךָ חָבִיב לִפְנֵי הַקָּדוֹשׁ בָּרוּךְ הוּא כְּשָׁלִיחַ שֶׁמִּשְׁתַּלֵּחַ לַעֲשׂוֹת מִצְוָה וְנוֹתֵן נַפְשׁוֹ כְּדֵי שֶׁיִּצְלַח בִּשְׁלִיחוּתוֹ, וְאֵין לְךָ בְּנֵי אָדָם שֶׁנִּשְׁתַּלְּחוּ לַעֲשׂוֹת מִצְוָה וְנוֹתְנִין נַפְשָׁם לְהַצְלִיחַ בִּשְׁלִיחוּתָן כְּאוֹתָם שְׁנַיִם שֶׁשָּׁלַח יְהוֹשֻׁעַ בִּן נוּן, שֶׁנֶּאֱמַר (יהושע ב, א): וַיִּשְׁלַח יְהוֹשֻׁעַ בִּן נוּן מִן הַשִּׁטִּים שְׁנַיִם, מִי הָיוּ, שָׁנוּ רַבּוֹתֵינוּ אֵלּוּ פִּינְחָס וְכָלֵב, וְהָלְכוּ וְנָתְנוּ נַפְשָׁם וְהִצְלִיחוּ בִּשְׁלִיחוּתָן. מַהוּ (יהושע ב, א): חֶרֶשׁ, מְלַמֵּד שֶׁעָשׂוּ עַצְמָן קַדָּרִין וְהָיוּ צוֹוְחִין הֲרֵי קְדֵרוֹת, מִי שֶׁיִּרְצֶה יָבוֹא וְיִקְנֶה, כָּל כָּךְ לָמָּה, שֶׁלֹא יַרְגִּישׁ בָּהֶן אָדָם, קְרֵי בֵּיהּ חֶרֶשׂ, כְּדֵי שֶׁלֹא יֹאמְרוּ בְּנֵי אָדָם שֶׁהֵן מְרַגְּלִים. (יהושע ב, א): וַיֵּלְכוּ וַיָּבֹאוּ בֵּית אִשָּׁה זוֹנָה וּשְׁמָהּ רָחָב וַיִּשְׁכְּבוּ שָׁמָּה, עָמְדָה וְקִבְּלָן, וְהִרְגִּישׁ בָּהֶן מֶלֶךְ יְרִיחוֹ וְשָׁמַע שֶׁבָּאוּ לַחְפֹּר אֶת הָאָרֶץ, שֶׁנֶּאֱמַר (יהושע ב, ב): וַיֵּאָמַר לְמֶלֶךְ יְרִיחוֹ לֵאמֹר, כֵּיוָן שֶׁהָלְכוּ לְבַקְּשָׁם, מֶה עָשְׂתָה רָחָב, נָטְלָה אוֹתָם לְהַטְמִינָם, אָמַר לָהּ פִּינְחָס אֲנִי כֹהֵן וְהַכֹּהֲנִים נִמְשְׁלוּ לְמַלְאָכִים, שֶׁנֶּאֱמַר (מלאכי ב, ז): כִּי שִׂפְתֵי כֹהֵן יִשְׁמְרוּ דַעַת וְתוֹרָה יְבַקְּשׁוּ מִפִּיהוּ כִּי מַלְאַךְ ה' צְבָאוֹת הוּא, וְהַמַּלְאָךְ מְבַקֵּשׁ נִרְאֶה מְבַקֵּשׁ אֵינוֹ נִרְאֶה. ... לְפִיכָךְ אָמַר לָהּ פִּינְחָס אֲנִי כֹהֵן וְאֵינִי צָרִיךְ לְהַטְמִין, הַטְמִינִי לְכָלֵב חֲבֵרִי וַאֲנִי עוֹמֵד לִפְנֵיהֶן וְאֵינָן רוֹאִין אוֹתִי, וְכֵן עָשְׂתָה, שֶׁנֶּאֱמַר (יהושע ב, ד): וַתִּקַּח הָאִשָּׁה אֶת שְׁנֵי הָאֲנָשִׁים וַתִּצְפְּנֵם אֵין כְּתִיב כָּאן, אֶלָּא (יהושע ב, ד): וַתִּצְפְּנוֹ, הֲרֵי שֶׁלֹא הִטְמִינָה לְפִינְחָס אֶלָּא לְכָלֵב, לְלַמֶּדְךָ כַּמָּה נָתְנוּ שְׁנֵי צַדִּיקִים אֵלּוּ נַפְשָׁם לַעֲשׂוֹת שְׁלִיחוּתָם. אֲבָל שְׁלוּחִים שֶׁשָּׁלַח משֶׁה הָיוּ רְשָׁעִים, מִנַּיִן, מִמַּה שֶּׁקָּרִינוּ בָּעִנְיָן (במדבר יג, ב): שְׁלַח לְךָ אֲנָשִׁים.
And so you find with reference to the sukkah that they have taught (in Suk. 2:4), “Agents for [carrying out] a religious duty are exempted from [the requirements of] the sukkah.”1Suk. 25a (bar). You have none so dear to the Holy One, blessed be He, as an agent, when he is sent to carry out a religious duty and is risking his life to succeed in it. And you have none who were sent to carry out a religious duty and who risked their lives to succeed in their mission like those two whom Joshua ben Nun sent. Thus it is stated (in Josh. 2:1), “Then Joshua ben Nun sent two [spies] from Shittim [secretly, saying]….” Who were they? Our masters have taught, “These were Phinehas and Caleb.” They had gone and risked their lives in order to be successful in their mission. What is the implication of secretly (heresh)? That they made themselves out to be potters and cried, “Here are pots. Whoever wants [some], let him come and buy.” [Their ruse was] so that no one would notice them. [Hence secretly (heresh) is written [in this verse,] but read it [as] clay (heres), (from which pots are made). [They had made themselves out to be potters] lest people say that they were spies. (Ibid., cont.) “So they went and came to the house of a woman who was a harlot whose name was Rahab […]”: She arose and received them. The king of Jericho became aware of them and heard that they had come to investigate the whole land, as stated (in vs. 2), “But it was told the king of Jericho [….].” When they came to look for them, what did Rahab do? She took them away to hide them. Phinehas said to her, “I am a priest, and the priests are comparable to the angels (mal'akhim), as stated (in Mal. 2:7), “For the lips of a priest preserve knowledge, and they seek Torah from his mouth, because he is a messenger (mal'akh) of the Lord of hosts.” Now an angel desiring [to be visible] is visible; and one desiring [to be invisible] is not visible. ... Hence Phinehas said to her, “I am a priest, and I do not need to hide. Hide my colleague, Caleb, and I will stand in front of them but they will not see me.” And so did she do, as stated (in Josh. 2:4), “So the woman took the two men [and hid him].” It does not say, “hid them,” but rather “hid him2Him is a literal translation of the Masoretic text.” Behold that she did not hide Phinehas, but rather [only] Caleb. [This is] to teach you how much these two righteous men risked themselves to fulfill their mission. But the agents whom Moses sent were wicked. Where is it shown? From what they have read on the matter (in Numb. 13:2) “Send men.”
See the land and Jericho. Jericho was included in it, so why specify? To teach you that it was equal to all. Just so you say And Moshe sent them and Pinchas, Pinchas was included so why specify? To teach you that he was equal to all...
Just so and the King Solomon loved foreign women and the daughter of Pharaoh, the daughter of Pharaoh was included so why specify? To teach that he loved her more than any and therefore she made him sin more than any....
The lady:
מלבים:
מפורסמת בשמה אצל גדולי הארץ, נגלו לה סתרי גדולי הארץ וסודותיהם. ואצלה יחקורו כל הנעשה בארץ, ולכן לא הלכו לשום מקום רק "וישכבו שמה":
Malbim:
Her name was known to all of the great men in the land. They would reveal the secrets of the land to her. If the spies stayed there they would be able to find out about all of the aspects going on around the land. Therefore, the spies did not go to any other place, they just "slept there"
The motive:
ר"א אומר קריעת ים סוף שמע ובא שנא' (יהושע ה, א) ויהי כשמוע כל מלכי האמורי ואף רחב הזונה אמרה לשלוחי יהושע (יהושע ב, י) כי שמענו את אשר הוביש ה' את מי ים סוף
מאי שנא התם דאמר (ליה) (יהושע ה, א) ולא היה בם עוד רוח ומ"ש הכא דקאמר (יהושע ב, יא) ולא קמה עוד רוח באיש
דאפילו אקשויי נמי לא אקשו ומנא ידעה דאמר מר אין לך כל שר ונגיד שלא בא על רחב הזונה
אמרו בת י' שנים היתה כשיצאו ישראל ממצרים וזנתה [כל] מ' שנה שהיו ישראל במדבר אחר נ' שנה נתגיירה אמרה יהא מחול לי בשכר חבל חלון ופשתים:
The Gemara offers another explanation of what Yitro heard: Rabbi Eliezer says: He heard about the splitting of the Red Sea and came, as it is stated in a similar context with regard to the splitting of the Jordan in the days of Joshua: “And it came to pass, when all the kings of the Amorites heard how that the Lord had dried up the waters of the Jordan from before the children of Israel, until they were passed over, that their heart melted, neither was there spirit in them anymore, because of the children of Israel” (Joshua 5:1). And even Rahab the prostitute said to Joshua’s messengers: “For we have heard how the Lord dried up the water of the Red Sea before you” (Joshua 2:10).
The Gemara asks: What is different there, i.e., with regard to the splitting of the Jordan, where the verse states: “Neither was there spirit in them anymore,” and what is different here, i.e., in the statement of Rahab, where the verse states: “Neither did there remain [kama] any more spirit in any man” (Joshua 2:11)?
The Gemara replies that Rahab meant they were not even able to become erect. The Gemara asks: And how did Rahab know this? The Gemara replies: As the Master said: You do not have any prince or ruler at that time who did not engage in intercourse with Rahab the prostitute.
The Gemara adds that the Sages said with regard to Rahab: She was ten years old when the Jewish people left Egypt, and she engaged in prostitution all forty years that the Jewish people were in the wilderness. After that, when she was fifty years old, she converted. She said: May all of my sins of prostitution be forgiven me as a reward for the rope, window, and flax.
The legacy:
איתיביה רב עינא סבא לרב נחמן שמונה נביאים והם כהנים יצאו מרחב הזונה ואלו הן נריה ברוך ושריה מחסיה ירמיה חלקיה חנמאל ושלום רבי יהודה אומר אף חולדה הנביאה מבני בניה של רחב הזונה היתה כתיב הכא בן תקוה וכתיב התם (יהושע ב, יח) את תקות חוט השני
אמר ליה עינא סבא ואמרי לה פתיא אוכמא מיני ומינך תסתיים שמעתא דאיגיירא ונסבה יהושע ומי הוו ליה זרעא ליהושע והכתיב (דברי הימים א ז, כז) נון בנו יהושע בנו בני לא הוו ליה בנתן הוו ליה
Rav Eina the Elder raised an objection from a baraita to Rav Naḥman’s teaching. The baraita indicates that Huldah was in fact a descendant of Rahab, and seemingly not of Joshua: Eight prophets, who were also priests, descended from Rahab the prostitute, and they are: Neriah; his son Baruch; Seraiah; Mahseiah; Jeremiah; his father, Hilkiah; Jeremiah’s cousin Hanamel; and Hanamel’s father, Shallum. Rabbi Yehuda said: So too, Huldah the prophetess was a descendant of Rahab the prostitute, as it is written here with regard to Huldah: “The son of Tikvah,” and it is written elsewhere: “This cord of [tikvat] scarlet thread” (Joshua 2:18).
Rav Naḥman said to him: Eina the Elder, and some say that he said to him: Blackened pot, i.e., my colleague in Torah, who has toiled and blackened his face in Torah study, from me and from you the matter may be concluded. For Rahab converted and married Joshua. But did Joshua have any descendants? But isn’t it written in the genealogical list of the tribe of Ephraim: “Nun his son, Joshua his son” (I Chronicles 7:27)? The listing does not continue any further, implying that Joshua had no sons. The Gemara answers: Indeed, he did not have sons, but he did have daughters.