session.setConfig(config);
session.connect(5000); // timeout after 5 seconds
// exec 'scp -t rfile' remotely
Channel channel=session.openChannel("exec");
((ChannelExec)channel).setCommand(command);
// get I/O streams for remote scp
OutputStream out=channel.getOutputStream();
InputStream in=channel.getInputStream();