tar/untar over ssh

I use red hat linux.
I have two linux server .
I want to use tar over ssh to tar and untar the file.
The server A , have IP 10.1.1.a ,there is dir a and contain files.
The server B have IP 10.1.1.b , there is dir b and contain file .
So, in above case ,how can I tar over ssh sunc that the file in dir a , server a can tar to server b ,dir b .
and if I use untar over ssh ,if the tar ball in server b , dir b ,say b.tar , how can I extract it to server a ,dir a over ssh ???
Please advice in detailed command .