karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KARAF-4809) SSHd should not listen to all hosts
Date Tue, 06 Feb 2018 14:46:00 GMT

    [ https://issues.apache.org/jira/browse/KARAF-4809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16353952#comment-16353952
] 

ASF GitHub Bot commented on KARAF-4809:
---------------------------------------

jbonofre closed pull request #260: KARAF-4809, SSH should not listen to all hosts
URL: https://github.com/apache/karaf/pull/260
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/assemblies/features/base/src/main/resources/resources/etc/org.apache.karaf.shell.cfg
b/assemblies/features/base/src/main/resources/resources/etc/org.apache.karaf.shell.cfg
index de4b163909..2734b4a061 100644
--- a/assemblies/features/base/src/main/resources/resources/etc/org.apache.karaf.shell.cfg
+++ b/assemblies/features/base/src/main/resources/resources/etc/org.apache.karaf.shell.cfg
@@ -23,9 +23,10 @@
 
 #
 # Via sshPort and sshHost you define the address you can login into Karaf.
-#
-sshPort = 8101
-sshHost = 0.0.0.0
+# Default(sshPort): 8101
+# Default(sshHost): 127.0.0.1
+#sshPort = 8101
+#sshHost = 127.0.0.1
 
 #
 # The sshIdleTimeout defines the inactivity timeout to logout the SSH session.
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 2714398d47..44f5ec06c4 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
@@ -140,8 +140,8 @@ protected void doStop() {
     }
 
     protected SshServer createSshServer(SessionFactory sessionFactory) {
-        int sshPort           = getInt("sshPort", 8181);
-        String sshHost        = getString("sshHost", "0.0.0.0");
+        int sshPort           = getInt("sshPort", 8101);
+        String sshHost        = getString("sshHost", "127.0.0.1");
         long sshIdleTimeout   = getLong("sshIdleTimeout", 1800000);
         String sshRealm       = getString("sshRealm", "karaf");
         String hostKey        = getString("hostKey", System.getProperty("karaf.etc") + "/host.key");


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> SSHd should not listen to all hosts
> -----------------------------------
>
>                 Key: KARAF-4809
>                 URL: https://issues.apache.org/jira/browse/KARAF-4809
>             Project: Karaf
>          Issue Type: Bug
>    Affects Versions: 4.0.7
>            Reporter: Lars Kiesow
>            Assignee: Jean-Baptiste Onofré
>            Priority: Major
>
> The default SSH server configuration will make Karaf listen to all hosts. It is usually
good practice to instead listen to localhost only by default to avoid possible security risks
(e.g. accidentally exposing an unconfigured SSH server).
> This can be fixed by adjusting `sshHost` in `org.apache.karaf.shell.cfg`



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message