You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "xiezhi (JIRA)" <ji...@apache.org> on 2013/07/02 11:59:22 UTC

[jira] [Commented] (SSHD-103) SimpleGeneratorHostKeyProvider fails to read files it wrote "StreamCorruptedException: unexpected block data"

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

xiezhi commented on SSHD-103:
-----------------------------

SSHD-78 looks like no patch.
So how to fix the issue?
                
> SimpleGeneratorHostKeyProvider fails to read files it wrote "StreamCorruptedException: unexpected block data"
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: SSHD-103
>                 URL: https://issues.apache.org/jira/browse/SSHD-103
>             Project: MINA SSHD
>          Issue Type: Bug
>    Affects Versions: 0.5.0
>            Reporter: alex hutter
>            Assignee: Guillaume Nodet
>
> I followed the tutorial at http://mina.apache.org/sshd/embedding-sshd-in-5-minutes.html to create a basic sshd application.  As in the example, I am using SimpleGeneratorHostKeyProvider to provide the server identity.  I am allowing SimpleGeneratorHostKeyProvider to generate its own key file.  However when it tries to read its own output file, it fails and generates a new key.  This means that ever time the server is restarted the file is generated again, so clients must remove the old entry from their known_hosts file.
> Log output:
> 3273 [NioProcessor-2] INFO org.apache.sshd.server.session.ServerSession - Session created...
> 3307 [NioProcessor-2] INFO org.apache.sshd.common.keyprovider.FileKeyPairProvider - Unable to read key /home/alex/hostkey.ser: java.io.StreamCorruptedException: unexpected block data
> 3309 [NioProcessor-2] INFO org.apache.sshd.common.keyprovider.FileKeyPairProvider - Generating host key...
> 3337 [NioProcessor-2] INFO org.apache.sshd.server.session.ServerSession - Client version string: SSH-2.0-OpenSSH_5.3p1 Debian-3ubuntu4

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira