Samuel the Small stood on his feet and said to him: Rabbi, I entered to ask about the law. He said to him: What is it to you, Eldad and Medad? For all Israel knows that even if I had said only two should enter, you would have been one of them. It was said: One hangs the key and the writing-tablet of a dead man because of grief of spirit. And when Samuel the Small died, they hung his key and his writing-tablet upon his coffin, because he had no son. And Rabban Gamliel and Rabbi Elazar ben Azaryah eulogized him and said: For this one it is fitting to weep, for this one it is fitting to mourn. When kings die they leave their crowns to their sons; when the wealthy die they leave their riches to their sons; but Samuel the Small took the precious things of the world and went his way.
The Keys Hung on the Coffin of Samuel the Small
Yalkut Shimoni on Torah 261:6
עָמַד שְׁמוּאֵל הַקָּטָן עַל רַגְלָיו, אָמַר לוֹ, רַבִּי הֲלָכָה נִכְנַסְתִּי לִישָּׁאֵל, אָמַר לוֹ, מַה לְּךָ אֶלְדָּד וּמֵידָד, שֶׁכָּל יִשְׂרָאֵל יוֹדְעִין שֶׁאִילּוּ אָמַרְתִּי שֶׁלֹּא יִכָּנְסוּ אֶלָּא שְׁנַיִם שֶׁהָיִיתָ אֶחָד מֵהֶם. אָמַר, תּוֹלִין מַפְתֵּחוֹ וּפִנְקָסוֹ שֶׁל מֵת מִפְּנֵי עָגְמַת נֶפֶשׁ וּכְשֶׁמֵּת שְׁמוּאֵל הַקָּטָן תָּלוּ מַפְתֵּחוֹ וּפִנְקָסוֹ בַאֲרוֹנוֹ מִפְּנֵי שֶׁלֹּא הָיָה לוֹ בֵּן. וְהָיָה רַבָּן גַּמְלִיאֵל וְרַבִּי אֶלְעָזָר בֶּן עֲזַרְיָה מַסְפִּידִין עָלָיו וְאָמְרוּ עַל זֶה נָאֶה לִבְכּוֹת, עַל זֶה נָאֶה לְהִתְאַבֵּל, מְלָכִים מֵתִים מְנִיחִין כִּתְרֵיהֶן לִבְנֵיהֶם, עֲשִׁירִים מֵתִים מְנִיחִין עָשְׁרָן לִבְנֵיהֶן, שְׁמוּאֵל הַקָּטָן נָטַל חֲמוּדוֹת שֶׁל עוֹלָם וְהָלַךְ לוֹ.