This commit is contained in:
Nunzio Andrea Galante 2017-07-17 21:55:35 +00:00
parent 9e15d89db4
commit 0785091c08
1 changed files with 3 additions and 1 deletions

View File

@ -107,6 +107,8 @@ public class CheckMethod {
Channel channel = null;
ChannelSftp c = null;
boolean success = false;
ServiceConfiguration p = new ServiceConfiguration();
jsch.setKnownHosts("~/.ssh/known_hosts");
String privateKey = "~/.ssh/id_rsa";
@ -114,7 +116,7 @@ public class CheckMethod {
jsch.addIdentity(privateKey);
System.out.println("Private Key Added.");
session = jsch.getSession("root", "dataminer1-devnext.d4science.org");
session = jsch.getSession("root", p.getStagingHost());
System.out.println("session created.");
java.util.Properties config = new java.util.Properties();