How do diff over ssh?

How do I diff files/folders across machines provided that the only connectivity available is ssh?