The Messenger of Allah ﷺ said, "When two Muslims meet and shake hands, praise Allah , and seek His forgiveness, they are both forgiven."
حدثنا عمرو بن عون أخبرنا هشيم عن أبي بلج عن زيد أبي الحكم العنزي
قال رسول الله ﷺ إذا التقى المسلمان فتصافحا وحمدا الله عز وجل واستغفراه غفر لهما
No references are available.
Sourcing, [its chain of transmission is daif] Bayhaqi narrated it, 7/99, from the hadith of Abu Dawud through this chain. Zayd Anazi is unknown, no one deemed him reliable except Ibn Hibban, and the hadith has daif corroborating narrations.