Abu Hurairah (May Allah be pleased with him) reported:
Messenger of Allah (ﷺ) said, "When one of you meets a brother (in Faith) he should greet him. Then if a tree or a wall or a stone intervenes between them and then he meets him again, he should greet him."[Abu Dawud]. (IT)
App reference (IT): Book 6, Hadith 16 (IT)
Arabic/English book reference (IT): Book 6, Hadith 860 (IT)