I have server2 with an file "/home/test.tar.gz". On server1 i want to execute command via ssh to extract test.tar.gz to local directory.
Something like:
sshpass -p 'password' ssh root@server2 "tar zxf /home/test.tar.gz" > /home/try
Is this even possible?
You cannot redirect them to a single file as you are extracting multiple types of files.
In case you are trying to extract to a directory then.