Hadith 6:994
Abu Mu'awiyah narrated to us, from Ubaydullah, from Nafi', from Ibn Umar, that when he intended to depart, he would enter the mosque and pray, then he would come to the grave of the Prophet, peace and blessings of Allah be upon him, and say: "Peace be upon you, O Messenger of Allah. Peace be upon you, O Abu Bakr. Peace be upon you, O my father." Then he would set off on his way. And when he arrived from a journey, he would do that before entering his house.
حدثنا أبو معاوية عن عبيد الله عن نافع عن بن عمر أنه كان إذا أراد أن يخرج دخل المسجد فصلى ثم أتى قبر النبي صلى الله عليه وسلم فقال السلام عليكم يا رسول الله السلام عليك يا أبا بكر السلام عليك يا أبتاه ثم يأخذ وجهه وكان إذا قدم من سفر يفعل ذلك قبل ان يدخل منزله