The Prophet (ﷺ) said: If two Muslims meet, shake hands, praise Allah, and ask Him for forgiveness, they will be forgiven.
Sunan Abi Dawud Book 43, Hadith 439