This is caused by https://issues.apache.org/jira/browse/SSHD-732 I've also added a workaround in Karaf which should be in 4.1.1:
https://github.com/apache/karaf/blob/master/client/src/main/java/org/apache/karaf/client/Main.java#L154 2017-03-29 16:35 GMT+02:00 Anders <anders.andersso...@consultant.volvo.com>: > Hello! > > I am trying Karaf 4.1.0. All things below is done on an unmodified > directory > structure after extracting apache-karaf-4.1.0.tar.gz. I am starting the > software on a Fedora 25 64bit Oracle JDK 8 (tried as well OpenJDK 8) > running > in VirtualBox, using the command bin/start. > > Karaf 4.1.0 starts fine. However when I try to connect to the shell using > bin/client it continuously asks me for the password: > > $ bin/client > client: JAVA_HOME not set; results may vary > Logging in as karaf > Password: > Password: > No more authentication methods available > > I tried to set JAVA_HOME variable but that just removed the warning. I can > login with ssh: > > $ ssh -p 8101 karaf@localhost > Password authentication > Password: > __ __ ____ > / //_/____ __________ _/ __/ > / ,< / __ `/ ___/ __ `/ /_ > / /| |/ /_/ / / / /_/ / __/ > /_/ |_|\__,_/_/ \__,_/_/ > > Apache Karaf (4.1.0) > > Hit '<tab>' for a list of available commands > and '[cmd] --help' for help on a specific command. > Hit 'system:shutdown' to shutdown Karaf. > Hit '<ctrl-d>' or type 'logout' to disconnect shell from current session. > > karaf@root()> > > However ssh is unusable as that somehow adds way to many tabs and spaces > (like pasting indented code to vim with wrong settings)...it is unreadable. > > The next odd thing is: > I tried Karaf 4.0.8 and that works! Not only does it works, it can connect > to Karaf 4.1.0 no problems. It does not ask for a password: > > $ bin/client > client: JAVA_HOME not set; results may vary > Logging in as karaf > __ __ ____ > / //_/____ __________ _/ __/ > / ,< / __ `/ ___/ __ `/ /_ > / /| |/ /_/ / / / /_/ / __/ > /_/ |_|\__,_/_/ \__,_/_/ > > Apache Karaf (4.1.0) > > Hit '<tab>' for a list of available commands > and '[cmd] --help' for help on a specific command. > Hit 'system:shutdown' to shutdown Karaf. > Hit '<ctrl-d>' or type 'logout' to disconnect shell from current session. > > karaf@root()> > > The output is correctly formatted here and is usable (except I have to > press > Ctrl-j to run commands, as it is running in a hard core Emacs setting, > Enter > is not responding). > > Lastly I tried bin/shell. From there I could access ssh:ssh. I got the > output in this pastebin: https://pastebin.com/2wg0rv3B. I did two > attempts, > one to default port 22 (not asking for password) and 8101 (asked twice for > password). You can see the second attempt about halfway down. I pressed > ENTER a few times on the prompt so it is easier to find. > > I watched data/log/karaf.log. It does add this line (before typing > password, > but after I run bin/client): > 2017-03-29T16:31:37,069 | WARN | sshd-SshServer[279691af]-nio2-thread-1 | > VersionProperties$LazyHolder | 48 - org.apache.sshd.core - 1.2.0 | > Failed (FileNotFoundException) to load version properties: Resource does > not > exists > > That message appears only once, NOT once per attempt. Once per restart. And > as said, before I type the password. > > Do anyone have any clue what might be the problem? I would be really happy > to hear what it might be! > > > > -- > View this message in context: http://karaf.922171.n3.nabble. > com/Odd-behaviour-with-bin-client-tp4049962.html > Sent from the Karaf - User mailing list archive at Nabble.com. > -- ------------------------ Guillaume Nodet