I think it's this sutta...
'Monks, even if a monk should take hold of the edge of my outer garment and should walk close behind me, step for step, yet if he should be covetous, strongly attracted by pleasures of the senses, malevolent in thought, of corrupt mind and purpose, of confused recollection, inattentive and not contemplative, scatter-brained, his sense-faculties uncontrolled, then he is far from me and I am far from him.'
'Monks, if the monk should be staying even a hundred miles away, yet he is not covetous, not strongly attracted by the pleasures of the senses, not malevolent in thought, not of corrupt mind and purpose, his collection firmly set, attentive, contemplative, his thoughts be one-pointed, restrained in his sense-faculties, then he is near me and I am near him.'
Again, it's Venerable K. Sri Dhammananda quoting it... ( http://www.buddhanet.net/budsas/ebud/wh ... ev/177.htm
)... this time without the paraphrasing, but with no more information about its source other than to say it's from the Samyutta Nikaya)