### Question:
SSH2Util { public static String copyFileToRemote(Machine machine, String tempPath, String url, boolean sudo) throws Exception { StringBuilder command = new StringBuilder(); if (sudo) { command.append("sudo "); } String rmTemplate = "rm -rf %s;"; command.append(String.format(rmTemplate, tempPath)); if (sudo) { command.append("sudo "); } String mkdirTemplate = "mkdir -p %s;"; command.append(String.format(mkdirTemplate, tempPath)); if (sudo) { command.append("sudo "); } String wgetTemplate = "/usr/bin/wget -P %s %s;"; command.append(String.format(wgetTemplate, tempPath, url)); return SSH2Util.execute(machine, command.toString()); } private  SSH2Util(); static void wget(Machine machine, String targetPath, String fileName, String remoteUrl, boolean sudo); static String copy(Machine machine, String originalPath, String targetPath, boolean sudo); static String copy2(Machine machine, String originalPath, String targetPath, boolean sudo); static String copyFileToRemote(Machine machine, String tempPath, String url, boolean sudo); static String rm(Machine machine, String filePath, boolean sudo); static String unzipToTargetPath(Machine machine, String filePath, String targetPath, boolean sudo); static String mkdir(Machine machine, String path, boolean sudo); static String execute(Machine machine, String commands); @Deprecated static String localExecute(String command); static Connection getConnection(Machine machine);  }### Answer:
@Test public void copyRedisConfigToRemote() throws Exception { String s = SSH2Util.copyFileToRemote(machine, "/data/redis/docker/cluster", "127.0.0.1:8182/redis-manager/config/cluster/redis.conf", true); System.err.println(s); }