Code:
ssh server2 < archive.tar.gz "tar -xzf - -C /home/"
assumes your tar can handle the decompression ( the z arg )
- on its own is read from stdin
if your tar doesn’t handle the decompression
Code:
ssh server2 < archive.tar.gz "gunzip - | tar -xzf - -C /home/"
Note, you probably won't need the - with the tar, since the | implies it