source: silsilat ul-ahaadeeth is-saheeha – the series of authentic narrations – hadeeth no. 16
On the authority of Abu Huraira: “when the Prophet (sallAllaahu ‘alayhi wa sallam) used to say farewell to someone, he [sallAllaahu ‘alayhi wa sallam] would say:
أَسْتَوْدِعُ اللهَ دِينَكَ وَأَمَانَتَكَ وَخَوَاتِيمَ عَمَلِكَ
(I entrust your religion, your family and belongings (that you are leaving behind), and the last of your deeds to Allaah).”
Shaykh al-Albaani (rahimahullaah) comments:
“A number of benefits are gained from this authentic hadeeth. First: the permissibility of saying farewell with the mentioned saying in it:
‘أَسْتَوْدِعُ اللهَ دِينَكَ وَأَمَانَتَكَ وَخَوَاتِيمَ عَمَلِكَ,’ and the traveler responds to him and says: ‘أَسْتَوْدِعُكُمُ اللهَ الَّذِي لاَ تَضِيعُ وَدَائِعُهُ’ (I entrust you to Allaah, whose trusts are not lost). Refer to ‘Al-Kalim At-Tayyib.’
Second: (the permissibility of) taking hold of one hand during handshaking, which has been mentioned in many narrations, and this hadeeth indicates the derivation of this word (‘handshaking’) in the (Arabic) language. According to Lisaan ul-‘Arab: ‘al-musaafaha (handshaking) is taking hold of the hand, the same as at-tasaafuh. A man handshakes another man when he places the side of his palm in the side of the other’s palm, and the sides of their palms are the front of them – like the hadeeth of handshaking upon meeting, which is done with one another by joining the side of a palm with another palm and turning face-to-face.’ I (Shaykh al-Albaani) say: there is that which reports this meaning as well in some of the previously mentioned narrations, such as the marfoo’ hadeeth of Hudhaifa: ‘Indeed, if the believer meets another believer, then gives him the salaam and takes hold of his hand and handshakes him, their sins fall off as the leaves of trees fall off.’ Al-Mundhuri said: ‘At-Tabaraani narrated it in ‘Al-Awsat’ and I don’t know of anyone who was criticized among its narrators.’ I (Shaykh al-Albaani) say: it has evidences by which it rises to the rank of being authentic, such as (that which was reported) on the authority of Anas by Ad-Dhiyaa Al-Maqdisee in ‘Al-Mukhtaara,’ which al-Mundhuri attributed to Ahmad and others. So all these narrations indicate that the sunnah in handshaking is taking hold of one hand; therefore, the handshaking with both hands that some of the scholars do is against the Sunnah, so let this be known.
The third benefit: that handshaking is legislated at the time of parting as well… The reason for inferring, rather quoting (this) becomes clear by remembering the permissibility of (giving) the salaam when parting as well due to his (the Prophet’s) saying (sallAllaahu ‘alayhi wa sallam): ‘If one of you enters the gathering then let him give the salaam, and if he leaves then let him give the salaam, as the first one is not more deserving (to be said) than the other one,’ Abu Daawood, at-Tirmidhi and others narrated it with a hasan (good) chain of narration. So the saying of some (people) is that handshaking at the time of parting is an innovation which has no truth. Yes, indeed the one who reads the mentioned narrations about handshaking when meeting will find them to be more in number and stronger than the mentioned narrations about handshaking when parting; and the one who is intelligent will conclude from that, that the permissibility of the second handshaking is not like that of the first (handshaking) in rank. Therefore, the first one is sunnah and the second one is recommended. As for (the latter) being an innovation, then no (this is not true) due to the evidence that we mentioned.
And as for handshaking immediately after the prayers, then it is undoubtedly an innovation, except if (the handshaking) takes place between two persons who have not met before that, then it is sunnah as you learned.”
 Saheeh Al-Kalim at-Tayyib #133
 The Goodly Words by Shaykh Ibn Taimiya
 The Arab Tongue; one of the well-known Arabic dictionaries
 a narration attributed to the Prophet (sallAllaahu ‘alayhi wa sallam)
 Silsilat ul-Ahaadeeth is-Saheeha #526
 Saheeh Abi Daawood #5208, Saheeh at-Tirmidhi #2706