Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
suyuti:15646a
Request/Fix translation

  

السيوطي:١٥٦٤٦a

"عَلَيكَ بِتَقْوى اللهِ مَا استَطَعْتَ، وَاذْكُرِ اللهَ عنْدَ كُلِّ حَجرٍ وشجرٍ، وَما عَمِلَت مِنْ سُوءٍ فأَحِدثْ للهِ فِيهِ تَوَبَةً: السِّرُّ بالسِّرّ، والْعَلانِيَةُ بالْعَلانِيَة".  

[حم] أحمد في الزهد، [طب] الطبرانى في الكبير عن معاذ

See similar narrations below:

Collected by Ṭabarānī, Aḥmad's Zuhd
tabarani:17529Aḥmad b. ʿAmr al-Khallāl > Yaʿqūb b. Ḥumayd > Anas b. ʿIyāḍ And ʿAbd al-ʿAzīz b. Muḥammad > Sharīk b. ʿAbdullāh b. Abū Namir > ʿAṭāʾ b. Yasār > Muʿādh

[Machine] I said, "O Messenger of Allah, advise me." He said, "Fear Allah as much as you can and remember Allah at every stone and tree. And for every bad deed you commit, seek forgiveness from Allah in secret. And in public, openly repent to Him."  

الطبراني:١٧٥٢٩حَدَّثَنَا أَحْمَدُ بْنُ عَمْرٍو الْخَلَّالُ ثنا يَعْقُوبُ بْنُ حُمَيْدٍ ثنا أَنَسُ بْنُ عِيَاضٍ وَعَبْدُ الْعَزِيزِ بْنُ مُحَمَّدٍ عَنْ شَرِيكِ بْنِ عَبْدِ اللهِ بْنِ أَبِي نَمِرٍ عَنْ عَطَاءِ بْنِ يَسَارٍ عَنْ مُعَاذٍ قَالَ

قُلْتُ يَا رَسُولَ اللهِ أَوْصِنِي فَقَالَ عَلَيْكَ بِتَقْوَى اللهِ مَا اسْتَطَعْتَ وَاذْكُرِ اللهَ عِنْدَ كُلِّ حَجَرٍ وشَجَرٍ وَمَا عَمِلْتَ مِنْ سُوءٍ فَأَحْدَثْ لِلَّهِ فِيهِ تَوْبَةً السِّرُّ بِالسِّرِّ وَالْعَلَانِيَةُ بِالْعَلَانِيَةِ  

ahmad-zuhd:141ʿAbdullāh from my father > ʿAbd al-Raḥman > Zuhayr > Sharīk b. ʿAbdullāh > ʿAṭāʾ b. Yasār

[Machine] The Prophet ﷺ sent Mu'adh to Yemen and he said, "O Messenger of Allah, advise me." He said, "You must have Taqwa (fear of Allah) as much as you can, and remember Allah at every stone and tree. And when you commit a sin, follow it with repentance, with secrecy if it was done secretly, and with openness if it was done openly."  

الزهد لأحمد:١٤١حَدَّثَنَا عَبْدُ اللَّهِ حَدَّثَنَا أَبِي حَدَّثَنَا عَبْدُ الرَّحْمَنِ حَدَّثَنَا زُهَيْرٌ عَنْ شَرِيكِ بْنِ عَبْدِ اللَّهِ عَنْ عَطَاءِ بْنِ يَسَارٍ

أَنَّ النَّبِيَّ ﷺ بَعَثَ مُعَاذًا إِلَى الْيَمَنِ فَقَالَ يَا رَسُولَ اللَّهِ أَوْصِنِي قَالَ «عَلَيْكَ بِتَقْوَى اللَّهِ مَا اسْتَطَعْتَ وَاذْكُرِ اللَّهَ ﷻ عِنْدَ كُلِّ حَجَرٍ وَشَجَرٍ وَإِذَا عَمِلْتَ سَيِّئَةً فَأَحْدِثْ عِنْدَهَا تَوْبَةً السِّرُّ بِالسِّرِّ وَالْعَلَانِيَةُ بِالْعَلَانِيَةِ»