File sshKeysTarget = new File( "target/ssh-keys" );
FileUtils.copyDirectory( new File( "src/test/ssh-keys" ), sshKeysTarget );
// ssh keys need to 700 permissions
// to prevent WARNING: UNPROTECTED PRIVATE KEY FILE!
Commandline commandline = new Commandline( "chmod" );
commandline.createArg().setValue( "-R" );
commandline.createArg().setValue( "700" );
commandline.createArg().setValue( sshKeysTarget.getCanonicalPath() );
CommandLineUtils.StringStreamConsumer out = new CommandLineUtils.StringStreamConsumer();
CommandLineUtils.StringStreamConsumer err = new CommandLineUtils.StringStreamConsumer();
int exitCode = CommandLineUtils.executeCommandLine( commandline, out, err );