SSH failure: 'no hostkey alg'

5,616 views
Skip to first unread message

joncfoo

unread,
Mar 5, 2009, 1:56:10 AM3/5/09
to Repo and Gerrit Discussion
Hi, there I followed the install documentation and got Gerrit up and
running, registered a user, and uploaded my id_rsa.pub key. However I
get the following error when I test ssh:

> ssh -p 29418 joncfoo@localhost
no hostkey alg

The jetty logs show:
2009-03-05 00:42:43,240::WARN :
org.apache.sshd.server.session.ServerSession - Exception caught
java.lang.IllegalStateException: Unable to negociate
at org.apache.sshd.common.session.AbstractSession.negociate
(AbstractSession.java:853)
at org.apache.sshd.server.session.ServerSession.handleMessage
(ServerSession.java:142)
at org.apache.sshd.common.session.AbstractSession.decode
(AbstractSession.java:494)
at
org.apache.sshd.common.session.AbstractSession.messageReceived
(AbstractSession.java:218)
at
org.apache.sshd.common.AbstractSessionIoHandler.messageReceived
(AbstractSessionIoHandler.java:59)
at org.apache.mina.core.filterchain.DefaultIoFilterChain
$TailFilter.messageReceived(DefaultIoFilterChain.java:722)
---- snip ----

I have the following jars in $JETTY_HOME/lib/plus:
bcmail-jdk16-141.jar
bcprov-jdk16-141.jar
bcpg-jdk16-141.jar
bctsp-jdk16-141.jar
c3p0-0.9.1.2.jar
jetty-plus-6.1.14.jar
postgresql-8.3-604.jdbc4.jar

Am I missing anything here?

Thanks!

Shawn Pearce

unread,
Mar 5, 2009, 3:12:56 AM3/5/09
to repo-d...@googlegroups.com
Did you restart Jetty after adding bcprov to lib/plus ?

Did you configure site_path in system_config ?

Did you create ssh keys under site_path using ssh-keygen ?

Did you restart Jetty (or gerrit) since doing those things ?


I've never seen this error come up before.  My initial guess is its an initialization order issue, like you did something on disk but didn't restart the code that cares about it only during startup.

Jey Michael

unread,
Mar 5, 2009, 11:33:15 AM3/5/09
to repo-d...@googlegroups.com
On Wed, Mar 4, 2009 at 10:56 PM, joncfoo <jon...@gmail.com> wrote:
>
> Hi, there I followed the install documentation and got Gerrit up and
> running, registered a user, and uploaded my id_rsa.pub key. However I
> get the following error when I test ssh:
>
>> ssh -p 29418 joncfoo@localhost
> no hostkey alg
>

Long time back, I have seen this error (on browser) on gerrit, when
the ssh keys were not properly uploaded. After adding the proper key
and/or restarting JETTY, it went away.

I used jetty.sh restart often, at the beginning while setup. That
avoided a lot of user/admin pilot-errors.

-Jey

joncfoo

unread,
Mar 5, 2009, 8:26:51 PM3/5/09
to Repo and Gerrit Discussion
It turns out I did not have the ssh keys in the site_path directory.
Once I put them there it worked fine.

Thanks for the questions, they helped me narrow down the issue :)

On Mar 5, 10:33 am, Jey Michael <jey.mich...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages