import com.xebialabs.overthere.OverthereFile;
public class ManipulateDirectory {
public static void main(String[] args) throws IOException {
ConnectionOptions options = new ConnectionOptions();
options.set(ADDRESS, "unix-box");
options.set(USERNAME, "demo");
options.set(PASSWORD, "secret");
options.set(OPERATING_SYSTEM, UNIX);
options.set(CONNECTION_TYPE, SFTP);
OverthereConnection connection = Overthere.getConnection("ssh", options);
try {
connection.execute(CmdLine.build("cp", "-r", "/var/log/apt", "/tmp/logs1"));
OverthereFile logs1 = connection.getFile("/tmp/logs1");
OverthereFile logs2 = connection.getFile("/tmp/logs2");