The Hebrew word in Josh 2:1 is zanah. It is also translated commit fornication, go awhoring, play the harlot, play the whore, whorish, whore, etc. It is used in Lev 19:29; Hos 4:13; Ex 34:16; Isa 23:17 and many other places where the meaning is quite clear. In the New Testament, the word is porne, in James 2:25 for example, and I do not imagine I need to tell you the English word we get from that Greek one. This same word is translated whore in Rev 17:1,15,16; 19:2. Rahab was a harlot, no ifs, ands, or buts about it.
So what is the problem with commentators who insist on “innkeeper?” The same one the Pharisees had. If Jesus was the Messiah, how could he possibly associate with publicans and sinners? If Rahab was a harlot, how could she possibly be in the genealogy of Christ? Yet they talk about the grace and mercy of God like they understand it better than we do.
And sometimes we are no better. Whom do we open our arms to when they walk through our doors? Whom do we actively seek and label “good prospects for the gospel?” Yet the people we choose to shun are the people who understand grace because they understand their need for it. We are a bit like the rich, young ruler, who, though he knew something was missing in his life despite all the laws he kept faithfully, still thought his salvation depended upon something he could do.
Rahab showed her dependence on God with a scarlet line she hung from her window. Did you know that word is only translated “line” twice in the Old Testament, counting this occurrence in Josh 2:21? The other translations are expectation (seven times such as Psa 62:5), hope (23 times, such as Jer 17:13; Psa 71:5), and the thing that I long for (once, Job 6:8). I do believe it was a literal rope of some sort, but it seems more than passing coincident that the word most of the time has those other meanings. I have often wondered what her neighbors thought of that cord hanging there, but every day Rahab was reminded of the salvation she did not deserve, that she hoped for, longed for, and expected to receive when those people marched into the land.
When we get a little too big for our britches, a little too proud of our pedigree in the kingdom, maybe we need to hang a scarlet cord in our windows to remind us what we used to be, and what we have waiting for us in spite of that.
But when the kindness of God our Savior, and his love toward man, appeared, not by works done in righteousness, which we did ourselves, but according to his mercy he saved us, through the washing of regeneration and renewing of the Holy Spirit, which he poured out upon us richly through Jesus Christ our Savior, that being justified by his grace we might be made heirs according to the hope of eternal life. Titus 3:4-7