Abu Musa Ashari reported,

We were with the Prophet ﷺ on a journey, and whenever we ascended high ground we would say "Allahu Akbar"… the rest of the hadith.In another narration, "Whenever we came upon a valley, we would say 'There is no god but Allah' and 'Allahu Akbar.'"In yet another narration, "A man, every time he climbed a mountain pass, would call out, 'There is no god but Allah, and Allah is the greatest.'"

Azami 11199

Sahih

عن أبي موسى قال

كنا مع النبي ﷺ في سفر، فكنا إذا علونا كبرنا… الحديث. وفي رواية: فكنا إذا أشرفنا على واد هللنا وكبرنا. وفي رواية أخرى: فجعل رجل كلما علا ثنية نادى: لا إله إلا الله، والله أكبر.

الأعظمي 11199صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Supplications, remembrances, and prayer upon the chosen Prophet ﷺ
Chapter
Supplications for riding and travel
Section
What a traveler says when ascending a height or descending a valley
Numbering
Jami al-Kamil 11199 (2nd edition)
Azami 11199