*Hi JB,*
*I tried it again but same issue. Karaf SSH port 22222 is not listening. Could it be some config issue?* *[root@ip-10-89-101-98 apache-karaf]# netstat -tulnp | grep 22222[root@ip-10-89-101-98 apache-karaf]# bin/client -a 22222Logging in as karafFailed to get the session.[root@ip-10-89-101-98 apache-karaf]# ssh -p 22222 [email protected] <[email protected]>ssh: connect to host 127.0.0.1 port 22222: Connection refused[root@ip-10-89-101-98 apache-karaf]#* *cat etc/org.apache.karaf.shell.cfg | grep -v "^#"sshPort=22222sshHost=127.0.0.1sshIdleTimeout=1800000sshRealm=karafhostKey=${karaf.etc}/host.keyhostKeyFormat=simplecompletionMode=GLOBAL* *Thanks & Regards,Yogesh Sharma * On Fri, Jan 25, 2019 at 7:57 PM Jean-Baptiste Onofré <[email protected]> wrote: > So, on a fresh Karaf 4.1.6 instance (I'm on Ubuntu): > > 1. I changed etc/org.apache.karaf.shell.cfg with: > > sshPort=22222 > > 2. I started instance with regular bin/karaf > > 3. I can connect with the client, no problem: > > bin/client -a 22222 > > 4. I can also connect with ssh: > > ssh -p 22222 karaf@localhost > > So it works without problem for me. > > Can you please try to remove the heading/trailing space around 22222 ? > > Regards > JB > > On 25/01/2019 15:15, Yogesh Sharma wrote: > > Hi JB, > > > > Will you be able to replicate this issue? > > > > /Thanks & Regards, > > > > Yogesh Sharma > > / > > > > > > On Thu, Jan 24, 2019 at 3:44 PM Jean-Baptiste Onofré <[email protected] > > <mailto:[email protected]>> wrote: > > > > Let me try with 4.1.6. > > > > Regards > > JB > > > > On 24/01/2019 10:42, Yogesh Sharma wrote: > > > Hi JB, > > > > > > Please find the comments inline below: > > > > > > *what Karaf version are you using ?* > > > > > > Version: 4.1.6 > > > > > > *Did you try to find on 0.0.0.0 instead of the loopback ?* > > > > > > Yes, it is not listening there as well (netstat) and client gives > the > > > same error message > > > > > > [root@ip-10-89-85-51 bin]# netstat -tulnp | grep 0.0.0.0 | grep > 22222 > > > [root@ip-10-89-85-51 bin]# ../bin/client -a 22222 -h 0.0.0.0 > > > Logging in as karaf > > > Failed to get the session. > > > [root@ip-10-89-85-51 bin] > > > > > > > > > > > > *Do you have something in the log when sshd starts ?* > > > > > > Nothing unusual, Below are the restart logs > > > > > > Jan 24 01:41:53 ip-10-89-85-51 systemd: Stopping OpenSSH server > > daemon... > > > Jan 24 01:41:53 ip-10-89-85-51 systemd: Stopped OpenSSH server > daemon. > > > Jan 24 01:41:53 ip-10-89-85-51 systemd: Starting OpenSSH server > > daemon... > > > Jan 24 01:41:53 ip-10-89-85-51 sshd: /etc/ssh/sshd_config line 71: > > > Deprecated option RhostsRSAAuthentication > > > Jan 24 01:41:53 ip-10-89-85-51 systemd: Started OpenSSH server > daemon. > > > > > > /Thanks & Regards, > > > > > > Yogesh Sharma > > > / > > > > > > > > > On Thu, Jan 24, 2019 at 2:41 PM Jean-Baptiste Onofré > > <[email protected] <mailto:[email protected]> > > > <mailto:[email protected] <mailto:[email protected]>>> wrote: > > > > > > Hi, > > > > > > what Karaf version are you using ? > > > > > > Did you try to find on 0.0.0.0 instead of the loopback ? > > > > > > Do you have something in the log when sshd starts ? > > > > > > Regards > > > JB > > > > > > On 24/01/2019 09:48, Yogesh Sharma wrote: > > > > Hi List, > > > > > > > > We are getting "Failed to get the session." while trying to > > connect to > > > > karaf using client. Actual issue is we are unable to list > > bundle. > > > > > > > > > > > > We are using custom sshPort in org.apache.karaf.shell.cfg > i.e. : > > > > > > > > # cat org.apache.karaf.shell.cfg | grep -v "^#" > > > > sshPort = 22222 > > > > sshHost = 127.0.0.1 > > > > sshIdleTimeout = 1800000 > > > > sshRealm = karaf > > > > hostKey = ${karaf.etc}/host.key > > > > hostKeyFormat = simple > > > > sshRole = admin > > > > completionMode = GLOBAL > > > > > > > > However, I don't see that this port is listening and we do > > > bin/client we > > > > get below message: > > > > > > > > [root@localhost etc]# netstat -tulnp | grep 22222 > > > > [root@localhost etc]# > > > > > > > > Login Attempt using client is failing with *"Failed to get > the > > > session."* > > > > > > > > *[root@ip-10-89-83-49 etc]# ../bin/client > > > > Logging in as karaf > > > > Failed to get the session.* > > > > > > > > [root@ip-10-89-83-49 etc]# ../bin/client -a 22222 > > > > Logging in as karaf > > > > Failed to get the session. > > > > > > > > [root@ip-10-89-83-49 etc]# ../bin/client -a 22222 -h > 127.0.0.1 > > > > Logging in as karaf > > > > Failed to get the session. > > > > [root@ip-10-89-83-49 etc]# > > > > > > > > Any suggestions please ? > > > > > > > > > > > > /Thanks & Regards, > > > > > > > > Yogesh Sharma / > > > > > > -- > > > Jean-Baptiste Onofré > > > [email protected] <mailto:[email protected]> > > <mailto:[email protected] <mailto:[email protected]>> > > > http://blog.nanthrax.net > > > Talend - http://www.talend.com > > > > > > > -- > > Jean-Baptiste Onofré > > [email protected] <mailto:[email protected]> > > http://blog.nanthrax.net > > Talend - http://www.talend.com > > > > -- > Jean-Baptiste Onofré > [email protected] > http://blog.nanthrax.net > Talend - http://www.talend.com >
