Bamidbar Rabbah (12:03) R. Simeon b. Yohai further said: The Holy One, blessed be He, gave Israel at Sinai a weapon upon which the Ineffable Name was written. Thou shalt not be afraid of the terror by night (Ps. XCI, 5), namely of Igrath, daughter of Mahalath, and her chariot, and of any of the demons who hold sway at night. Nor of the arrow that flieth by day (ib.). R. Berekiah explained that there is a kind of demon who flies through the air like a bird, and darts like an arrow. What will deliver you from him? The act of sending away the mother bird from a nest when you wish to take the young; for in accordance with this it is written above, ‘He will deliver thee from the snare of the fowler’ and ‘snare’ cannot but allude to a bird; as is borne out by the context which says, Will a bird fall in a snare upon the earth? (Amos III, 5). Now it says, If a bird's nest chance to be before thee... thou shalt in any wtse let the dam go... that it may be well with thee (Deut. XXII, 6 f.).3 Of the pestilence that walketh in darkness (Ps. XCI, 6) implies that if a man's deeds are in the dark the pestilence gains mastery over him. In a like strain it says, Before Him goeth the pestilence, and fiery bolts go forth at his feet (Hab. III, 5). So here too it says, Of the pestilence that walketh in the darkness. Nor of t/ze destruction (keteb) that wasteth at noonday (Ps. Ioc. cit.). Our Rabbis explain that ‘keteb’ is a demon. And why was he called keteb’?’ R. Abba son of Kahana said: Because he breaks into the daily studies from the beginning of four hours of the day to the end of nine.8. Levi said: Because he robs pupils of their noonday lessons from the end of four hours to the beginning of nine hours. He holds sway neither in the shade nor in the sun but between the shade and the sun. His head is like that of a calf and a horn grows out from the centre of his forehead, and he rolls like a pitcher. R. Huna, in the name of R. Joseph, said: ‘Keteb meriri’ is in form covered with scales, hairy all over, and full of eyes. And, said R. Simeon b. Lakish, he has one eye set in his heart, and anyone who sees him can never survive, whether it be man or beast. Anyone who sees him drops down dead. ‘Meriri’ holds sway during the period between the seventeenth of Tammuz and the ninth of Ab. Hezekiah saw him and dropped down on his face and died. R. Phinehas the priest said: It is related that one saw him and was stricken with epilepsy They reported that Judah b. R. Samuel saw him and did not drop down. Nevertheless, it is reported that he died. R. Abbahu was once sitting and studying in a certain synagogue in Caesarea. He noticed one man pursuing another having in his hand a rod with which he wished to strike the other He [R. Abbahu] saw that a demon also followed after the same man having in his hand an iron rod. R. Abbahu went out and followed the pursuing man and said to him: ' Do not strike him, lest he die! ' Said the other: ‘Master! Can he die by this?’ He answered: ‘There is a demon following behind you, and he has an iron rod in his hand. If you strike him with this and he strikes him with that he will die.’ R. Johanan used to tell teachers of Scripture and of Mishnah not to lift the strap against the children on these days. R. Samuel b. R. Isaac used to tell teachers of Scripture and of Mishnah to dismiss the children after four hours on these days. A thousand shall at thy side, and ten thousand at thy right hand (Ps. XCI,7) tefillin, it is written, ‘A thousand shall fall at thy side’; for a thousand angels have been placed there to protect him. Of the right hand, however, which has control over many commandments, it says, ‘ Ten thousand at thy right hand’; myriads of angels are charged with the care of it R. Hanina son of R. Abbahu expounded- The text does not read, ‘Shall be delivered unto thee but ‘Shall fall’, as much as to say: If a thousand demons come against thee, they will fall at the side which has charge of one commandment, and if a myriad demons come, they will fall at the side which is in charge of many commandments. It is the usual practice in this world that if a person is entrusted to the care of a thousand men it is his duty to feed them. Why? Because they are assigned to him for the purpose of protecting him. The Holy One, blessed be He, however, assigns to a man a thousand angels to be on his left side and ten thousand on his right for his w elfare and for the purpose of protecting him, yet He shall not come nigh thee (ib.) with the request that you should feed them. Only with thine eyes shalt thou behold (ib. 8) thy prosperity, And see the recompense of the wicked (ib.); you will see how the Holy One, blessed be He, will requite the wicked for their deeds. For Thou, O Lord, art my refuge; Thou hast made the most high Thy habitation (ib. 9). R. Hanina expounded: Israel said to the Holy One, blessed be He: ‘Thou givest the Torah to us here below, but causest Thy Shechinah to abide on high.’ Thus the meaning of the text, ' For Thou, O Lord, art my refuge ' is, ' Thou hast given us Thy Torah’; and ‘Hast made the most high Thy habitation ’ means, ‘But Thou hast made Thy abode in the high heavens.’ There shall no evil befall thee (ib. 1O). This accords with the text, There shall be no mischief befall the righteous (Prov. XII, 21). Neither shall any plague come nighthy tent (Ps. loc. cit.). R. Johanan expounded: Before the Tabernacle had been erected the demons were wont to vex mankind in this world. From the moment when the Tabernacle was erected, and the Shechinah took up its residence here below, the demons were exterminated from the world. Thus the text, ‘Neither shall any plague come nigh thy tent’ alludes to the Tent of Meeting. Said R. Simeon b. Lakish: What need for you to trouble with the book of Psalms? Surely, there is nothing wanting in the original1 context, which reads The Lord bless thee, and keep thee (Num. VI, 24), i.e. from the demons. When would that be? IT CAME TO PASS ON THE DAY THAT MOSES HAD MADE AN END (KALLOTH) OF SETTING UP THE TABERNACLE. What is the signification of KALLOTH? It denotes that the demons were exterminated (kallu) from the world.
Shulchan Arukh (Yoreh De'ah 116:5) One must refrain from putting coins in one's mouth, lest it's covered with dried saliva of those afflicted with boils. He should not put the palm of his hand in his arm pit, lest his hand touched a metzorah or a harmful poison. He should not put a loaf of bread under his armpit, because of the sweat. He should not put a cooked item or drinks under the bed, since an evil spirit rests on them. He should not stick a knife in an esrog or a radish, lest one fall on its edge and die. Hagah: Similarly, he should be careful of all things that cause danger, because danger is stricter than transgressions, and one should be more careful with an uncertain danger than with an uncertain issur. They also prohibited to go in a dangerous place, such as under a leaning wall, or alone at night. They also prohibited to drink water from rivers at night or to put one's mouth on a stream of water and drink, because these matters have a concern of danger. It is the widespread custom not to drink water during the equinox, and the early ones wrote this and it is not to be changed. They also wrote to flee from the city when a plague is in the city, and one should leave at the beginning of the plague and not at the end. And all of these things are because of the danger, and a person who guards his soul will distance himself from them and it is prohibited to rely on a miracle in all of these matters.