Ibn Samt reported,

I heard it from the Messenger of Allah ﷺ.He replied, "Yes."He said, "I heard the Messenger of Allah ﷺ say, 'Standing guard for a single day in the path of Allah is better,'" and perhaps he said, "'greater than fasting a month and praying through its nights. Whoever dies while doing so is shielded from the trial of the grave, and his deeds continue to grow for him until the Day of Resurrection.'"

Tirmidhi 1665

Sahih

حدثنا ابن أبي عمر حدثنا سفيان بن عيينة حدثنا محمد بن المنكدر قال مر سلمان الفارسي بشرحبيل بن السمط وهو في مرابط له وقد شق عليه وعلى أصحابه قال ألا أحدثك يا

ابن السمط بحديث

سمعته من رسول الله ﷺ قال بلى قال سمعت رسول الله ﷺ يقول رباط يوم في سبيل الله أفضل وربما قال خير من صيام شهر وقيامه ومن مات فيه وقي فتنة القبر ونمي له عمله إلى يوم القيامة

الترمذي 1665صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami Tirmidhi
Book
Virtues of jihad
Chapter
Virtue of the one stationed at the frontier
Numbering
Darussalam 1665
Tirmidhi 1665