[
https://issues.apache.org/jira/browse/AIRAVATA-1069?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sachith Withana resolved AIRAVATA-1069.
---------------------------------------
Resolution: Done
Did it using the JCraft library.
here's the code sample
jsch.addIdentity(privateKey, paraphrase);
Session session = jsch.getSession(user, host, 22);
Properties config = new java.util.Properties();
config.put("StrictHostKeyChecking", "no");
config.put("PreferredAuthentications",
"publickey");
session.setConfig(config);
session.connect(20000);
Channel channel = session.openChannel("exec");
((ChannelExec) channel).setCommand(command);
((ChannelExec) channel).setAgentForwarding(true);
channel.setInputStream(null);
((ChannelExec) channel).setErrStream(System.err);
channel.connect();
.........
channel.disconnect();
session.disconnect();
> Test the SCP file transferring with agent forwarding
> ----------------------------------------------------
>
> Key: AIRAVATA-1069
> URL: https://issues.apache.org/jira/browse/AIRAVATA-1069
> Project: Airavata
> Issue Type: Sub-task
> Reporter: Sachith Withana
> Assignee: Sachith Withana
>
--
This message was sent by Atlassian JIRA
(v6.2#6252)