Midrash Tanchuma, Ki Tisa 27

Whoever greets the old…it is as if he greets the Divine Presence.