public static (int, string) CollectStatistics(List <string> hosts, string user, string password, int sshPort, string remote, string local) { var errCode = 0; var result = ""; hosts.ForEach(host => { (errCode, result) = ShellHelper.ScpDirecotryRemoteToLocal(user, host, password, remote, local); if (errCode != 0) { Util.Log($"Collect statistic ERR {errCode}: {result}"); } }); return(errCode, result); }
public void Collect(string hostname, string username, string password, int port, string remote, string local) { ShellHelper.ScpDirecotryRemoteToLocal(username, hostname, password, remote, local); }