ssh [username@]<hostname | ip adres> "tar czvf - [path/directory]" > archive.tar.gz
example:
ssh user@host.com “tar czvf - /home” > home.tar.gz