You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2018/01/17 06:52:48 UTC

[karaf] branch master updated: KARAF-5569 Add CommandFactory to ssh server when sftp is disabled

This is an automated email from the ASF dual-hosted git repository.

jbonofre pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/karaf.git


The following commit(s) were added to refs/heads/master by this push:
     new 0f91a09  KARAF-5569 Add CommandFactory to ssh server when sftp is disabled
0f91a09 is described below

commit 0f91a095aba0a7abfe8e5f9fe174811a6826c11b
Author: clockard <ch...@connexta.com>
AuthorDate: Tue Jan 16 15:52:39 2018 -0700

    KARAF-5569 Add CommandFactory to ssh server when sftp is disabled
---
 shell/ssh/src/main/java/org/apache/karaf/shell/ssh/Activator.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/shell/ssh/src/main/java/org/apache/karaf/shell/ssh/Activator.java b/shell/ssh/src/main/java/org/apache/karaf/shell/ssh/Activator.java
index 1deb9fe..bdd0aaf 100644
--- a/shell/ssh/src/main/java/org/apache/karaf/shell/ssh/Activator.java
+++ b/shell/ssh/src/main/java/org/apache/karaf/shell/ssh/Activator.java
@@ -175,6 +175,8 @@ public class Activator extends BaseActivator implements ManagedService {
             server.setCommandFactory(new ScpCommandFactory.Builder().withDelegate(cmd -> new ShellCommand(sessionFactory, cmd)).build());
             server.setSubsystemFactories(Collections.singletonList(new SftpSubsystemFactory()));
             server.setFileSystemFactory(new VirtualFileSystemFactory(Paths.get(System.getProperty("karaf.base"))));
+        } else {
+            server.setCommandFactory(cmd -> new ShellCommand(sessionFactory, cmd));
         }
         server.setKeyPairProvider(keyPairProvider);
         server.setPasswordAuthenticator(authenticator);

-- 
To stop receiving notification emails like this one, please contact
['"commits@karaf.apache.org" <co...@karaf.apache.org>'].