How to unzip a file on a remote server

Seven Stars

How to unzip a file on a remote server

I posted a question earlier today asking " How to copy folders from local to a remote server with files present in the folders?" 
Unfortunately, I haven't got any reply.

 

So I followed someone's suggestion for a similar question online -
"you could create a zip or tar of the directory and its subfolders w/ files. Then, use tSFTP to transfer the files. Then, use tSsh to connect again and untar / unzip the file, containing subfolders and files."

 

Here is what I did:

1) With tFileArchive, I created a zip file for the folder and its subfolders w/ files in local machine;

2) With tFTPPut, I moved the zip file to the remove server;

Then I am stuck now. Don't know if I did step 1) and 2) correctly. And I couldn't find enough information for tSSH : Whether it can unzip the file on the remote server? If it can, How?

 

Thanks!

Nine Stars

Re: How to unzip a file on a remote server

All you need to do is use the command to unzip files at remote server

unzip zipfilename.zip -d destination_directory

Sample -

tSSH-1.JPGtSSH-2.JPG

 

As you could see, you have the option to provide multiple commands in the tSSH using the command separator. 

Seven Stars

Re: How to unzip a file on a remote server

Thank you iamabhishek for your reply!

 

I think the most difficult part for me is to set up the connection correct for tSSH.

Nine Stars

Re: How to unzip a file on a remote server

The connection properties for tSSH and tFTPConnection are very similar to each other. All you need to have is your target server details such as - host, port, username and password (if you choose authentication method as password).
Seven Stars

Re: How to unzip a file on a remote server

Hi iamabhishek,

 

I used the same Username, Host, Port as I used in tFTPConnection.

 

In my tFTPConnection I used "Public Key" Authentication method with a private key file, so I used the same in tSSH. But I had no luck - (BTW, the Schema was set to be "Built-In" and the Key Passphrase I used the defaulted)

 

statistics] connecting to socket on port 3958
[statistics] connected
Exception in component tSSH_1 (movefiles)
java.io.IOException: The execute request failed.
at ch.ethz.ssh2.channel.ChannelManager.requestExecCommand(ChannelManager.java:764)
at ch.ethz.ssh2.Session.execCommand(Session.java:256)
at ch.ethz.ssh2.Session.execCommand(Session.java:229)
at pl_project.movefiles_0_1.movefiles.tSSH_1Process(movefiles.java:394)
at pl_project.movefiles_0_1.movefiles$2.run(movefiles.java:734)
Caused by: java.io.IOException: The server denied the request.
at ch.ethz.ssh2.channel.ChannelManager.waitForChannelSuccessOrFailure(ChannelManager.java:235)
at ch.ethz.ssh2.channel.ChannelManager.requestExecCommand(ChannelManager.java:760)
... 4 more
[statistics] disconnected

15TH OCTOBER, COUNTY HALL, LONDON

Join us at the Community Lounge.

Register Now

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download