brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aleds...@apache.org
Subject [3/8] brooklyn-server git commit: Use ssh cli in batch mode - don't ask for passwords
Date Fri, 11 Nov 2016 09:50:19 GMT
Use ssh cli in batch mode - don't ask for passwords


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/69c91c35
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/69c91c35
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/69c91c35

Branch: refs/heads/master
Commit: 69c91c35aec7dc22187717cc1254e90f23e347a4
Parents: 89646d5
Author: Svetoslav Neykov <svetoslav.neykov@cloudsoftcorp.com>
Authored: Tue Nov 8 15:04:25 2016 +0200
Committer: Svetoslav Neykov <svetoslav.neykov@cloudsoftcorp.com>
Committed: Thu Nov 10 18:06:51 2016 +0200

----------------------------------------------------------------------
 .../apache/brooklyn/util/core/internal/ssh/cli/SshCliTool.java    | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/69c91c35/core/src/main/java/org/apache/brooklyn/util/core/internal/ssh/cli/SshCliTool.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/util/core/internal/ssh/cli/SshCliTool.java
b/core/src/main/java/org/apache/brooklyn/util/core/internal/ssh/cli/SshCliTool.java
index d5a8c6b..e854f18 100644
--- a/core/src/main/java/org/apache/brooklyn/util/core/internal/ssh/cli/SshCliTool.java
+++ b/core/src/main/java/org/apache/brooklyn/util/core/internal/ssh/cli/SshCliTool.java
@@ -224,6 +224,7 @@ public class SshCliTool extends SshAbstractTool implements SshTool {
         try {
             List<String> cmd = Lists.newArrayList();
             cmd.add(getOptionalVal(props, PROP_SCP_EXECUTABLE, scpExecutable));
+            cmd.add("-B");
             if (privateKeyFile != null) {
                 cmd.add("-i");
                 cmd.add(privateKeyFile.getAbsolutePath());
@@ -260,6 +261,8 @@ public class SshCliTool extends SshAbstractTool implements SshTool {
             List<String> cmd = Lists.newArrayList();
             cmd.add(getOptionalVal(props, PROP_SSH_EXECUTABLE, sshExecutable));
             String propsFlags = getOptionalVal(props, PROP_SSH_FLAGS, sshFlags);
+            cmd.add("-o");
+            cmd.add("BatchMode=yes");
             if (propsFlags!=null && propsFlags.trim().length()>0)
                 cmd.addAll(Arrays.asList(propsFlags.trim().split(" ")));
             if (privateKeyFile != null) {


Mime
View raw message