It is narrated from Sayyiduna Anas bin Malik (may Allah be pleased with him) that a man came to the Prophet (peace and blessings be upon him) and said: "O Prophet of Allah, I intend to travel, so give me some counsel." The Prophet (peace and blessings be upon him) asked him: "When (are you leaving)?" He said: "Tomorrow, if Allah wills." Then (at the time of departure) he came to him (peace and blessings be upon him), and he (peace and blessings be upon him) took hold of his hand and said: "Be in the protection of Allah and in His shelter. May Allah give you taqwa (piety) as your provision, forgive your sin, and turn you towards good wherever you may be." (The narrator Sa'id (may Allah have mercy on him) was unsure about one of the two expressions, "haythu ma kunta" and "ayna ma kunta", both meaning "wherever you may be".)
Imam al-Darimi (may Allah have mercy on him) narrated it from Muslim bin Ibrahim (may Allah have mercy on him).
And Imam al-Mahamili (may Allah have mercy on him) narrated it through Ubaydullah bin Jarir bin Jabalah, Abdullah bin Ahmad al-Dawraqi and Ahmad bin Muhammad bin Isa al-Qadi (may Allah have mercy on them), all of them from Muslim bin Ibrahim (may Allah have mercy on him), with the same chain and a similar meaning.