DANGERS OF NIGHT [night :danger]
(Mishnah): The one appointed over Har ha'Bayis would probe everyone guarding; torches went in front of him. If someone did not stand and say "Shalom Alecha", this shows that he was sleeping.
Megilah 3a (R. Yehoshua ben Levi): One may not greet a friend with 'Shalom' at night. Perhaps it is a Shed!
Shabbos 24b (Rava): If Yom Tov is on Shabbos, when the Shali'ach Tzibur says Birkas me'Ein Sheva (Kone Shamayim va'Aretz...Magen Avos...) after Ma'ariv, he does not mention Yom Tov, for this Berachah is solely due to Shabbos.
Letter of the law, Birkas me'Ein Sheva should not be said even on Shabbos. It was enacted due to danger.
151b (R. Chanina): One may not sleep alone in a house. If he does, he is possessed by Lilis (a Shed).
Pesachim 112a (Beraisa): One should not drink water on Tuesday night (without a Ner) or Shabbos night. If he does, he is responsible for his own death, from Ru'ach Ra'ah.
(Beraisa): One may not drink water at night from rivers or lakes. If he does so, he is responsible for his own death;
It is dangerous due to Shavriri (a Shed that causes blindness).
Ta'anis 22b (Beraisa): "I will give the rains in their times" refers to Tuesday nights and Shabbos night, when people are not found on the road.
Berachos 5a (R. Yitzchak): Anyone who reads Kri'as Shma before sleep is like one who bears a double-edged sword (to kill Mazikin) -- "Romemos Kel bi'Gronam v'Cherev Pifiyos b'Yadam."
Rif and Rosh (Shabbos 65b and 23:13): One may not sleep alone at night in a house. If he does, he is possessed by Lilis.
Rambam (Hilchos Berachos 11:4): We do not bless on Mayim Acharonim or other matters that are due to danger. This is like one who strains water before drinking at night, due to danger of leeches. He does not bless 'Who commanded us to strain the water.'
R. Yonah (Berachos 3a DH v'Im): A Chacham need not say Kri'as Shma Al ha'Mitah, for Torah protects him. Even though one opinion (Berachos 54b) says that a Chacham needs Shemirah, this is when he stands alone at night when it is totally dark.
Maharil (Minhagim, Likutim 58): One must be careful not to spend the night alone in a room. The Maharil would get a boy to lodge with him. One should not go through the Chatzer at night without a lamp, lest Ruchos Ra'os harm him. This includes not going alone in a field at night. Whenever the Gemara says 'house', e.g. regarding Lilis, it means a room with four walls.
Tosfos (Megilah 3a DH Chaishinan): We are concerned for Shedim only outside the city (where Mazikim are common), at night.
Me'iri (Shabbos 151b DH Asur): One may not sleep alone in a house. Similarly, whatever brings a person to the Nisayon (test) of fear is forbidden. Everything is based on his nature. If he did so, he should strengthen himself with trust in Hash-m and engage in Torah. Reading Kri'as Shma at night is like a double-edged sword.
Mordechai (Shabbos 407): On Shabbos night, the Shali'ach Tzibur says me'Ein Sheva after Shemoneh Esre, so people will wait for those late to finish his Tefilah, since people come from villages in the Techum to pray at night, and it is dangerous to be alone in the Beis ha'Keneses, like it says in Shabbos.
Avudraham (Ma'ariv Shel Shabbos): me'Ein Sheva was not enacted for weekdays or Yom Tov. We can say that on weekdays people engaged in work and prayed in their houses. They did not come to the Beis ha'Keneses. Chachamim were concerned for Shabbos, for Mazikim often come to settled areas on Tuesday and Shabbos nights. This is why these are the best times for rain (Ta'anis 22b).
Machzor Vitri (531:10): If one drinks mixed or exposed drinks that were left overnight, he is responsible for his own death, for it is dangerous.
Ra'avad (on Tamid 28a): One may not give Shalom to a colleague (at night), lest it is a Shed! Perhaps Shedim were not allowed to enter the Azarah. It seems that the Isur is only from far away, but not if one recognizes the person.
Yehudah Ya'aleh (OC 9 DH v'Sham): Surely one need not be concerned for Shedim in the Azarah!
Hagahah: Shmuel 1:3:10 shows that there is concern! When Hash-m called to Shmuel, Shmuel said 'speak'. He did not say 'speak Hashem' (like Eli had commanded him), for he feared lest it is not Hash-m. The Radak says that there is a Drash that it was a Shed. Later, I realized that this is not difficult. Surely the Ra'avad holds that the permanent Kedushah of the Beis ha'Mikdash did not allow Makikim there. Perhaps the Mishkan, which was temporary, had less Kedushah.
Note: What is the question? Kidushin 78b says that Shmuel was not in Heichal Hash-m at the time!
Yehudah Ya'aleh: Even in a Chulin house, where people are found, we are not concerned for Shedim, even if one does not recognize him (i.e. what he assumes is a person), even from far away in the city street, like Tosfos says (Megilah 3a). Piskei Tosfos there forbids giving Shalom to a friend at night in a field. I say that since the late Amora'im put a Cherem on Mazikim not to appear amidst people, nowadays we are not concerned lest it is a Shed. This is why the Poskim omitted this.
Shmiras ha'Guf veha'Nefesh (113): Also Maharash Engel (8:143) and Shevet Menasheh (73) say similarly.
Menoras ha'Ma'or (20 Derech Eretz): Drinking water at night from rivers or lakes is dangerous due to Shavriri, which blinds. The Targum of Sanverim (which afflicted the Sodomites who were threatening Lot) is Shavririya.
Shulchan Aruch (OC 218:9): We bless only for a miracle unlike nature. If a miracle is like the way of the world, e.g. thieves came upon him at night and he was saved, one need not bless.
Source (Beis Yosef DH Kasav): This is from the Avudraham.
Bach (5): In any case one blesses ha'Gomel (219:9).
Shulchan Aruch (ibid.): Some disagree. It is good to bless without Hash-m's name and Malchus.
Magen Avraham (239:7): One who sleeps in a house alone is possessed by Lilis. Maharil explains that this refers to sleeping alone in a room.
Machatzis ha'Shekel: The correct text in Shabbos mentions sleeping alone. The text of the Rif and Rosh says 'at night.' Perhaps even our text, which does not mention night, refers to at night, for Stam sleeping is at night.
Sha'ar ha'Tziyon (17): Based on the Maharil, even if there are others in the house, one who sleeps alone in a room must not lock the door. It must be open to the house. People are lenient about this. Even those who are stringent, if a woman lives alone, and leaving the door open while cause an Isur Yichud (seclusion), she should not open it. No harm will result - "Shomer Mitzvah Lo Yeda Davar Ra."
Kaf ha'Chayim (17): The Zohar connotes that if only he lives in the house, it is dangerous even during the day. If others live in the house, it is dangerous to be alone at night. If there is light of a lamp or the moon, this is like during the day. This applies to men and women equally. There is concern even for a room with a Mezuzah and Seforim.
Avodas ha'Kodesh (of the Birkei Yosef, Tziporen Shamir 7:107): If one sleeps alone at night in a house distinct from other houses, he is prone to have an emission.
Si'ach Yitzchak (118): The Semag and Magen Avraham bring the Isur to sleep alone. Some say that this refers to being alone in the house (Birkei Yosef, DM 1 citing the command of R. Eliezer ha'Gadol (54), who was a Rishon). Some say that it is being alone in the room (Maharil, Magen Avraham). Perhaps even according to our text, we are concerned only at night (Kalila, Yesod v'Shoresh ha'Avodah citing the Zohar). The Tur (YD 286) says that a Ru'ach Ra'ah would scare Maharam me'Rotenburg when he slept in his Beis Midrash during the afternoon, until he put a Mezuzah there. Orchos Chayim (239:5) brings from Eshel Avraham (Butshats) that Chazal warned only about sleeping alone in a Nochri's house, or a place without a Mezuzah. The Yerushalmi connotes that we are concerned only if it is totally dark. Orchos Chayim rules like the Yerushalmi. The Bavli (Berachos 43b) says that a torch helps like two people (to protect from Mazikim). This answers the Ra'avad's question. Since there were torches in front of him, there was no concern.
Gra (Ma'aseh Rav 214, in Sidur ha'Gra p.529, also cited in Bikurei Yakov 639:18, b'Sof): One may sleep alone in a Sukah. Shomer Mitzvah Lo Yeda Davar Ra.
Shulchan Aruch (268:8): On Shabbos night, the Shali'ach Tzibur says me'Ein Sheva.
Mishnah Berurah (20): Also nowadays (that the Beis ha'Keneses is in the city, and there is no danger - PF) we say this.
Kaf ha'Chayim (38): Everything Chazal said is based on deep secrets, but they put garment of simple meaning on it. The Ari Zal says that me'Ein Sheva is like Chazaras ha'Shatz.
Rema (YD 339:1): Some say that we do not dig a grave for one about to die, even if he is not in the house with him, until he dies. One may not dig a grave to be open until the morrow, when they will not bury the Mes that day. This is dangerous.
Beis Yosef (DH v'Li): R. Yehudah ha'Chasid says that if they dig a grave and leave it open, someone will die within 16 days.
Bach (DH v'Od): Maharshal says that the danger is only if the Mes is resting on the ground and the grave is left open at night.
Taz (YD 179:8): Divrei Torah are to heal the Nefesh, not the body. However, one may use Divrei Torah to protect a healthy person from getting sick. We say Kri'as Shma Al ha'Mitah for protection at night!
Toras ha'Minchah (Vayishlach Drashah 14 DH v'Chen): Yakov was harmed and endangered only because he was not careful and was alone at night, at a time and place where damagers are common - "va'Yivaser Yakov Levado va'Ya'avek Ish Imo."