SSH commands .tar.gz

So I’ve transferred over my cpanel backup from hostgator to my new dreamhost shared account but I am having a problem unzipping it.

It’s called hbackup.tar.gz

I manage to log into my Mac OSX terminal just fine and I get the Welcome to writing but when I run the following:

tar -zxvf hbackup.tar.gz the connection to closes automatically.

Am I doing something wrong or am I not allowed to perform these commands on a shared server?

I used separate commands:

gunzip hbackup.tar.gz then

tar -xvf hbackup.tar and that did the trick!