In the name of Allah, Most Gracious, Most Merciful.
Abu Hurairah (May Allah be pleased with him) reported: The Messenger of Allah (May Allah exalt his mention and protect him from imperfection) said: “By Him in Whose Hand my soul is! You will not enter Jannah until you believe, and you shall not believe until you love one another. May I inform you of something, if you do, you love each other. Promote greeting amongst you (by saying As-salamu ‘alaikum to one another)”. (Muslim)
Commentary: In this Hadith, Islam has been regarded as the medium of mutual love. This is the reason Muslims have been enjoined to greet each other regardless of acquaintance. It does not, however, mean that a Muslim will be a true believer or entitled to Jannah, by mere greeting. What it really means is that his Faith will become meaningful only when it is supported by actions. Greeting is an Islamic custom and a practical form and demonstration of it. The combination of Faith and its practice will take a Muslim to Jannah.
Riyaadiss-Saliheen (The Meadows of the Righteous)
By Imam An Nawawi
Chapter 46, Page 126, No 378