# SSH w/terminal remotely uzip untar or unstuff and archive



## Barrett (Apr 23, 2005)

Goal is to login in to remote server
Navigate to desired directory
Select desired .ZIP .SIT or .TGZ (tar) archive.
Expand it.
Delete it.

I get as far as opening up terminal

ssh user_name@domain
entering password
I then get 
user_name@hd1:~#

Oh wooppeee now what  ?????????

After someone helps me figure out how to do this the long hard cryptic terminal way; is there not a slick OS X gui for completing what should be as simple as using one of the FTP clients out there ?

Thanks,
Barrett


----------



## chornbe (Apr 23, 2005)

You want to do this via a script or at the command line, interactively?

You'll want to login :

ssh username@machine_name
enter password
cd /your/dir/tree
### do stuff here

It seems the problem is, in your example, you're validating the username to the domain, but not "landing" on a machine/selected dir tree.

If your machine(s) is configured correctly and you need domain authentication, then logging in a given machine *should* authenticate to the domain.


----------



## Barrett (Apr 23, 2005)

I have't got a clue.


----------



## scruffy (Apr 23, 2005)

http://kb.indiana.edu/data/afsk.html
and
http://www.isu.edu/departments/comcom/unix/workshop/unixindex.html
for introduction to basics - moving about directories, seeing, making and deleting files...

To expand the files:
unzip file.zip
gunzip file.gz (or file.tgz)
tar -xf file.tar

I don't know of a way to expand a .sit file from the command line - I think if you pay the shareware fee for the full version of stuffit there is a commandline utility.


----------



## michaelsanford (May 11, 2005)

You can even do it without having to enter an interactive shell:

ssh user@host "cd /path/to/file ; tar xv(z)f filename.tar(.gz)"


----------

