(Gen. 42:3:) "AND JOSEPH'S TEN BROTHERS WENT DOWN." Jacob said to them: I beg of you, do not enter by a single gate, on account of the evil eye. And so they did. When they entered, they did not all enter as one, but each and every one by himself. What did Joseph do? He stationed guards at the entrance to the gates of Egypt. He said: Whoever enters, let his name and his father's name be written down by you, and you are to bring me their names. And when the sons of Jacob entered, each and every one by himself, he (the guard) would say: What is your name? And he would say to him: Reuben son of Jacob. And so each and every one of them; he would write down his name and his father's name. And they brought the written records to Joseph. He said to them: Go and bring them. They went and found them in the market of the harlots, and they brought them to Joseph. Immediately Joseph recognized them, as it is said (Gen. 42:8): "AND JOSEPH RECOGNIZED HIS BROTHERS." He began to recall the dreams, as it is said (Gen. 42:9): "AND JOSEPH REMEMBERED THE DREAMS THAT HE HAD DREAMED ABOUT THEM." (Gen. 42:7:) "AND HE MADE HIMSELF A STRANGER TO THEM AND SPOKE HARSHLY WITH THEM." He began to be harsh with them and said to them: From where have you come? When they said: From the land of Canaan, he said to Simeon and to Levi: Are you accustomed to plundering people, just as you did in Shechem? This is the meaning of "AND HE SPOKE HARSHLY WITH THEM."
Joseph's Brothers Enter Egypt by Separate Gates
Midrash Tanchuma Buber, Miketz 10:1
וירדו אחי יוסף עשרה. אמר להם יעקב בבקשה מכם אל תכנסו בפולי אחד מפני עין הרע, וכן עשו, כיון שנכנסו לא נכנסו כולם כאחד, אלא כל אחד ואחד בפני עצמו, מה עשה יוסף הושיב שומרים על פתח פילאות של מצרים, אמר כל מי שהוא נכנס יהא שמו ושם אביו כתוב אצליכם ותהיו מביאים לי שמותם, וכיון שנכנסו בני יעקב כל אחד ואחד בפני עצמו, הוא היה אומר מה שמך, והוא אומר לו ראובן בן יעקב, וכן כל אחד ואחד מהם כותב שמו ושם אביו, והביאו הכתבים אצל יוסף, אמר להם לכו והביאו אותם, הלכו ומצאום בשוק של זונות והביאום אצל יוסף, מיד הכירם יוסף, שנאמר ויכר יוסף את אחיו, התחיל מזכיר את החלומות, שנאמר ויזכר יוסף את החלומות אשר חלם להם, ויתנכר אליהם וידבר אתם קשות, התחיל מתקשה להם ואמר להם מאין באתם, כיון שאמרו מארץ כנען, אמר לשמעון וללוי למודים אתם להיות בוזזים את בני אדם כשם שעשיתם בשכם, הוי וידבר אתם קשות.