import com.xebialabs.overthere.OverthereFile;
public class ManipulateFile {
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", "/etc/motd", "/tmp/motd1"));
OverthereFile motd1 = connection.getFile("/tmp/motd1");
OverthereFile motd2 = connection.getFile("/tmp/motd2");