You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Benson Margulies <be...@basistech.com> on 2015/07/26 04:35:10 UTC

ssh keys

2015-07-26 02:27:19,841 | WARN  | c]-nio2-thread-1 |
SimpleGeneratorHostKeyProvider   | 128 - org.apache.sshd.core - 0.14.0
| Unable to read key /opt/karaf/apache-karaf/etc/ssh/docker:
java.io.StreamCorruptedException: invalid stream header: 2D2D2D2D

That's an ssh RSA private key, generated with ssh-keygen. Does it have
to be PEM, or DSA, or both, or something?

Re: ssh keys

Posted by Benson Margulies <be...@basistech.com>.
On Sun, Jul 26, 2015 at 8:05 AM, James Carman
<ja...@carmanconsulting.com> wrote:
> Perhaps we just make a custom provider that tries all three types?

Well, with security, I get nervous about DWIM as opposed to declaration.

Could I interest you in getting it working with my approach of
'hostKeyFormat' and then we can go to the dev list or the JIRA and
hash out whether to implement the provider?



> On Sun, Jul 26, 2015 at 8:03 AM Benson Margulies <be...@basistech.com>
> wrote:
>>
>> I could use help with the testing.
>>
>> https://github.com/bimargulies/karaf/tree/karaf-3882-pem
>>
>> I'm trying to make an itest, if you want to take that part, send me
>> your github ID and I'll add you to my repo.
>>
>>
>> On Sun, Jul 26, 2015 at 7:45 AM, James Carman
>> <ja...@carmanconsulting.com> wrote:
>> > Yeah it'd be good to be able to specify the provider in the cfg file.
>> > I'd
>> > help with that patch if you want a partner in crime. :)
>> > On Sun, Jul 26, 2015 at 7:43 AM Benson Margulies <be...@basistech.com>
>> > wrote:
>> >>
>> >> On Sun, Jul 26, 2015 at 7:33 AM, James Carman
>> >> <ja...@carmanconsulting.com> wrote:
>> >> > That was me. I just googled for the same error message and it looked
>> >> > like
>> >> > they needed to be using PEM files. JB gave you different advice to
>> >> > check
>> >> > the
>> >> > key size and perhaps algorithm choices in the shell.cfg file. He's
>> >> > most
>> >> > likely right as he knows karaf inside and out and I was guessing :)
>> >>
>> >> Sorry for the misattribution.
>> >>
>> >> GIven that the code at
>> >> org.apache.karaf.shell.ssh.Activator#createSshServer uses
>> >> SimpleGeneratorHostKeyProvider, this isn't going to work. I read the
>> >> relevant source. That class ignores JB's values when reading, and then
>> >> generates a key if it can't read. It only reads from serialized Java.
>> >>
>> >> I feel a patch coming on.
>> >>
>> >>
>> >> > On Sun, Jul 26, 2015 at 7:29 AM Benson Margulies
>> >> > <be...@basistech.com>
>> >> > wrote:
>> >> >>
>> >> >> JB, according to the thread you linked, somehow I have to convince
>> >> >> Karaf to use PEMGeneratorHostKeyProvider. I'll regenerate the key
>> >> >> and
>> >> >> see if by some happy accident it somehow tries to use it to read the
>> >> >> key.
>> >> >>
>> >> >>
>> >> >> On Sun, Jul 26, 2015 at 12:26 AM, Jean-Baptiste Onofré
>> >> >> <jb...@nanthrax.net>
>> >> >> wrote:
>> >> >> > Hi,
>> >> >> >
>> >> >> > can you check in etc/org.apache.karaf.shell.cfg that the keySize
>> >> >> > and
>> >> >> > algorithm properties match you generated key.
>> >> >> >
>> >> >> > As the default is DSA (in etc/org.apache.karaf.shell.cfg), and as
>> >> >> > you
>> >> >> > created a RSA key, I bet the problem is there.
>> >> >> >
>> >> >> > Regards
>> >> >> > JB
>> >> >> >
>> >> >> > On 07/26/2015 04:35 AM, Benson Margulies wrote:
>> >> >> >>
>> >> >> >> 2015-07-26 02:27:19,841 | WARN  | c]-nio2-thread-1 |
>> >> >> >> SimpleGeneratorHostKeyProvider   | 128 - org.apache.sshd.core -
>> >> >> >> 0.14.0
>> >> >> >> | Unable to read key /opt/karaf/apache-karaf/etc/ssh/docker:
>> >> >> >> java.io.StreamCorruptedException: invalid stream header: 2D2D2D2D
>> >> >> >>
>> >> >> >> That's an ssh RSA private key, generated with ssh-keygen. Does it
>> >> >> >> have
>> >> >> >> to be PEM, or DSA, or both, or something?
>> >> >> >>
>> >> >> >
>> >> >> > --
>> >> >> > Jean-Baptiste Onofré
>> >> >> > jbonofre@apache.org
>> >> >> > http://blog.nanthrax.net
>> >> >> > Talend - http://www.talend.com

Re: ssh keys

Posted by Benson Margulies <be...@basistech.com>.
So, I'm standing back and seeing if you care to fill in
org.apache.karaf.itests.SshKeyFormatTest . Let me know; I'm sure I can
cargo-cult it into existence.

On Sun, Jul 26, 2015 at 8:11 AM, Benson Margulies <be...@basistech.com> wrote:
> On Sun, Jul 26, 2015 at 8:06 AM, James Carman
> <ja...@carmanconsulting.com> wrote:
>> jwcarman
>
> You are added.

Re: ssh keys

Posted by Benson Margulies <be...@basistech.com>.
On Sun, Jul 26, 2015 at 8:06 AM, James Carman
<ja...@carmanconsulting.com> wrote:
> jwcarman

You are added.

Re: ssh keys

Posted by James Carman <ja...@carmanconsulting.com>.
My GitHub id is jwcarman.
On Sun, Jul 26, 2015 at 8:05 AM James Carman <ja...@carmanconsulting.com>
wrote:

> Perhaps we just make a custom provider that tries all three types?
> On Sun, Jul 26, 2015 at 8:03 AM Benson Margulies <be...@basistech.com>
> wrote:
>
>> I could use help with the testing.
>>
>> https://github.com/bimargulies/karaf/tree/karaf-3882-pem
>>
>> I'm trying to make an itest, if you want to take that part, send me
>> your github ID and I'll add you to my repo.
>>
>>
>> On Sun, Jul 26, 2015 at 7:45 AM, James Carman
>> <ja...@carmanconsulting.com> wrote:
>> > Yeah it'd be good to be able to specify the provider in the cfg file.
>> I'd
>> > help with that patch if you want a partner in crime. :)
>> > On Sun, Jul 26, 2015 at 7:43 AM Benson Margulies <be...@basistech.com>
>> > wrote:
>> >>
>> >> On Sun, Jul 26, 2015 at 7:33 AM, James Carman
>> >> <ja...@carmanconsulting.com> wrote:
>> >> > That was me. I just googled for the same error message and it looked
>> >> > like
>> >> > they needed to be using PEM files. JB gave you different advice to
>> check
>> >> > the
>> >> > key size and perhaps algorithm choices in the shell.cfg file. He's
>> most
>> >> > likely right as he knows karaf inside and out and I was guessing :)
>> >>
>> >> Sorry for the misattribution.
>> >>
>> >> GIven that the code at
>> >> org.apache.karaf.shell.ssh.Activator#createSshServer uses
>> >> SimpleGeneratorHostKeyProvider, this isn't going to work. I read the
>> >> relevant source. That class ignores JB's values when reading, and then
>> >> generates a key if it can't read. It only reads from serialized Java.
>> >>
>> >> I feel a patch coming on.
>> >>
>> >>
>> >> > On Sun, Jul 26, 2015 at 7:29 AM Benson Margulies <
>> benson@basistech.com>
>> >> > wrote:
>> >> >>
>> >> >> JB, according to the thread you linked, somehow I have to convince
>> >> >> Karaf to use PEMGeneratorHostKeyProvider. I'll regenerate the key
>> and
>> >> >> see if by some happy accident it somehow tries to use it to read the
>> >> >> key.
>> >> >>
>> >> >>
>> >> >> On Sun, Jul 26, 2015 at 12:26 AM, Jean-Baptiste Onofré
>> >> >> <jb...@nanthrax.net>
>> >> >> wrote:
>> >> >> > Hi,
>> >> >> >
>> >> >> > can you check in etc/org.apache.karaf.shell.cfg that the keySize
>> and
>> >> >> > algorithm properties match you generated key.
>> >> >> >
>> >> >> > As the default is DSA (in etc/org.apache.karaf.shell.cfg), and as
>> you
>> >> >> > created a RSA key, I bet the problem is there.
>> >> >> >
>> >> >> > Regards
>> >> >> > JB
>> >> >> >
>> >> >> > On 07/26/2015 04:35 AM, Benson Margulies wrote:
>> >> >> >>
>> >> >> >> 2015-07-26 02:27:19,841 | WARN  | c]-nio2-thread-1 |
>> >> >> >> SimpleGeneratorHostKeyProvider   | 128 - org.apache.sshd.core -
>> >> >> >> 0.14.0
>> >> >> >> | Unable to read key /opt/karaf/apache-karaf/etc/ssh/docker:
>> >> >> >> java.io.StreamCorruptedException: invalid stream header:
>> 2D2D2D2D
>> >> >> >>
>> >> >> >> That's an ssh RSA private key, generated with ssh-keygen. Does it
>> >> >> >> have
>> >> >> >> to be PEM, or DSA, or both, or something?
>> >> >> >>
>> >> >> >
>> >> >> > --
>> >> >> > Jean-Baptiste Onofré
>> >> >> > jbonofre@apache.org
>> >> >> > http://blog.nanthrax.net
>> >> >> > Talend - http://www.talend.com
>>
>

Re: ssh keys

Posted by James Carman <ja...@carmanconsulting.com>.
Perhaps we just make a custom provider that tries all three types?
On Sun, Jul 26, 2015 at 8:03 AM Benson Margulies <be...@basistech.com>
wrote:

> I could use help with the testing.
>
> https://github.com/bimargulies/karaf/tree/karaf-3882-pem
>
> I'm trying to make an itest, if you want to take that part, send me
> your github ID and I'll add you to my repo.
>
>
> On Sun, Jul 26, 2015 at 7:45 AM, James Carman
> <ja...@carmanconsulting.com> wrote:
> > Yeah it'd be good to be able to specify the provider in the cfg file. I'd
> > help with that patch if you want a partner in crime. :)
> > On Sun, Jul 26, 2015 at 7:43 AM Benson Margulies <be...@basistech.com>
> > wrote:
> >>
> >> On Sun, Jul 26, 2015 at 7:33 AM, James Carman
> >> <ja...@carmanconsulting.com> wrote:
> >> > That was me. I just googled for the same error message and it looked
> >> > like
> >> > they needed to be using PEM files. JB gave you different advice to
> check
> >> > the
> >> > key size and perhaps algorithm choices in the shell.cfg file. He's
> most
> >> > likely right as he knows karaf inside and out and I was guessing :)
> >>
> >> Sorry for the misattribution.
> >>
> >> GIven that the code at
> >> org.apache.karaf.shell.ssh.Activator#createSshServer uses
> >> SimpleGeneratorHostKeyProvider, this isn't going to work. I read the
> >> relevant source. That class ignores JB's values when reading, and then
> >> generates a key if it can't read. It only reads from serialized Java.
> >>
> >> I feel a patch coming on.
> >>
> >>
> >> > On Sun, Jul 26, 2015 at 7:29 AM Benson Margulies <
> benson@basistech.com>
> >> > wrote:
> >> >>
> >> >> JB, according to the thread you linked, somehow I have to convince
> >> >> Karaf to use PEMGeneratorHostKeyProvider. I'll regenerate the key and
> >> >> see if by some happy accident it somehow tries to use it to read the
> >> >> key.
> >> >>
> >> >>
> >> >> On Sun, Jul 26, 2015 at 12:26 AM, Jean-Baptiste Onofré
> >> >> <jb...@nanthrax.net>
> >> >> wrote:
> >> >> > Hi,
> >> >> >
> >> >> > can you check in etc/org.apache.karaf.shell.cfg that the keySize
> and
> >> >> > algorithm properties match you generated key.
> >> >> >
> >> >> > As the default is DSA (in etc/org.apache.karaf.shell.cfg), and as
> you
> >> >> > created a RSA key, I bet the problem is there.
> >> >> >
> >> >> > Regards
> >> >> > JB
> >> >> >
> >> >> > On 07/26/2015 04:35 AM, Benson Margulies wrote:
> >> >> >>
> >> >> >> 2015-07-26 02:27:19,841 | WARN  | c]-nio2-thread-1 |
> >> >> >> SimpleGeneratorHostKeyProvider   | 128 - org.apache.sshd.core -
> >> >> >> 0.14.0
> >> >> >> | Unable to read key /opt/karaf/apache-karaf/etc/ssh/docker:
> >> >> >> java.io.StreamCorruptedException: invalid stream header: 2D2D2D2D
> >> >> >>
> >> >> >> That's an ssh RSA private key, generated with ssh-keygen. Does it
> >> >> >> have
> >> >> >> to be PEM, or DSA, or both, or something?
> >> >> >>
> >> >> >
> >> >> > --
> >> >> > Jean-Baptiste Onofré
> >> >> > jbonofre@apache.org
> >> >> > http://blog.nanthrax.net
> >> >> > Talend - http://www.talend.com
>

Re: ssh keys

Posted by Benson Margulies <be...@basistech.com>.
I could use help with the testing.

https://github.com/bimargulies/karaf/tree/karaf-3882-pem

I'm trying to make an itest, if you want to take that part, send me
your github ID and I'll add you to my repo.


On Sun, Jul 26, 2015 at 7:45 AM, James Carman
<ja...@carmanconsulting.com> wrote:
> Yeah it'd be good to be able to specify the provider in the cfg file. I'd
> help with that patch if you want a partner in crime. :)
> On Sun, Jul 26, 2015 at 7:43 AM Benson Margulies <be...@basistech.com>
> wrote:
>>
>> On Sun, Jul 26, 2015 at 7:33 AM, James Carman
>> <ja...@carmanconsulting.com> wrote:
>> > That was me. I just googled for the same error message and it looked
>> > like
>> > they needed to be using PEM files. JB gave you different advice to check
>> > the
>> > key size and perhaps algorithm choices in the shell.cfg file. He's most
>> > likely right as he knows karaf inside and out and I was guessing :)
>>
>> Sorry for the misattribution.
>>
>> GIven that the code at
>> org.apache.karaf.shell.ssh.Activator#createSshServer uses
>> SimpleGeneratorHostKeyProvider, this isn't going to work. I read the
>> relevant source. That class ignores JB's values when reading, and then
>> generates a key if it can't read. It only reads from serialized Java.
>>
>> I feel a patch coming on.
>>
>>
>> > On Sun, Jul 26, 2015 at 7:29 AM Benson Margulies <be...@basistech.com>
>> > wrote:
>> >>
>> >> JB, according to the thread you linked, somehow I have to convince
>> >> Karaf to use PEMGeneratorHostKeyProvider. I'll regenerate the key and
>> >> see if by some happy accident it somehow tries to use it to read the
>> >> key.
>> >>
>> >>
>> >> On Sun, Jul 26, 2015 at 12:26 AM, Jean-Baptiste Onofré
>> >> <jb...@nanthrax.net>
>> >> wrote:
>> >> > Hi,
>> >> >
>> >> > can you check in etc/org.apache.karaf.shell.cfg that the keySize and
>> >> > algorithm properties match you generated key.
>> >> >
>> >> > As the default is DSA (in etc/org.apache.karaf.shell.cfg), and as you
>> >> > created a RSA key, I bet the problem is there.
>> >> >
>> >> > Regards
>> >> > JB
>> >> >
>> >> > On 07/26/2015 04:35 AM, Benson Margulies wrote:
>> >> >>
>> >> >> 2015-07-26 02:27:19,841 | WARN  | c]-nio2-thread-1 |
>> >> >> SimpleGeneratorHostKeyProvider   | 128 - org.apache.sshd.core -
>> >> >> 0.14.0
>> >> >> | Unable to read key /opt/karaf/apache-karaf/etc/ssh/docker:
>> >> >> java.io.StreamCorruptedException: invalid stream header: 2D2D2D2D
>> >> >>
>> >> >> That's an ssh RSA private key, generated with ssh-keygen. Does it
>> >> >> have
>> >> >> to be PEM, or DSA, or both, or something?
>> >> >>
>> >> >
>> >> > --
>> >> > Jean-Baptiste Onofré
>> >> > jbonofre@apache.org
>> >> > http://blog.nanthrax.net
>> >> > Talend - http://www.talend.com

Re: ssh keys

Posted by James Carman <ja...@carmanconsulting.com>.
Yeah it'd be good to be able to specify the provider in the cfg file. I'd
help with that patch if you want a partner in crime. :)
On Sun, Jul 26, 2015 at 7:43 AM Benson Margulies <be...@basistech.com>
wrote:

> On Sun, Jul 26, 2015 at 7:33 AM, James Carman
> <ja...@carmanconsulting.com> wrote:
> > That was me. I just googled for the same error message and it looked like
> > they needed to be using PEM files. JB gave you different advice to check
> the
> > key size and perhaps algorithm choices in the shell.cfg file. He's most
> > likely right as he knows karaf inside and out and I was guessing :)
>
> Sorry for the misattribution.
>
> GIven that the code at
> org.apache.karaf.shell.ssh.Activator#createSshServer uses
> SimpleGeneratorHostKeyProvider, this isn't going to work. I read the
> relevant source. That class ignores JB's values when reading, and then
> generates a key if it can't read. It only reads from serialized Java.
>
> I feel a patch coming on.
>
>
> > On Sun, Jul 26, 2015 at 7:29 AM Benson Margulies <be...@basistech.com>
> > wrote:
> >>
> >> JB, according to the thread you linked, somehow I have to convince
> >> Karaf to use PEMGeneratorHostKeyProvider. I'll regenerate the key and
> >> see if by some happy accident it somehow tries to use it to read the
> >> key.
> >>
> >>
> >> On Sun, Jul 26, 2015 at 12:26 AM, Jean-Baptiste Onofré <jb@nanthrax.net
> >
> >> wrote:
> >> > Hi,
> >> >
> >> > can you check in etc/org.apache.karaf.shell.cfg that the keySize and
> >> > algorithm properties match you generated key.
> >> >
> >> > As the default is DSA (in etc/org.apache.karaf.shell.cfg), and as you
> >> > created a RSA key, I bet the problem is there.
> >> >
> >> > Regards
> >> > JB
> >> >
> >> > On 07/26/2015 04:35 AM, Benson Margulies wrote:
> >> >>
> >> >> 2015-07-26 02:27:19,841 | WARN  | c]-nio2-thread-1 |
> >> >> SimpleGeneratorHostKeyProvider   | 128 - org.apache.sshd.core -
> 0.14.0
> >> >> | Unable to read key /opt/karaf/apache-karaf/etc/ssh/docker:
> >> >> java.io.StreamCorruptedException: invalid stream header: 2D2D2D2D
> >> >>
> >> >> That's an ssh RSA private key, generated with ssh-keygen. Does it
> have
> >> >> to be PEM, or DSA, or both, or something?
> >> >>
> >> >
> >> > --
> >> > Jean-Baptiste Onofré
> >> > jbonofre@apache.org
> >> > http://blog.nanthrax.net
> >> > Talend - http://www.talend.com
>

Re: ssh keys

Posted by Benson Margulies <be...@basistech.com>.
On Sun, Jul 26, 2015 at 7:33 AM, James Carman
<ja...@carmanconsulting.com> wrote:
> That was me. I just googled for the same error message and it looked like
> they needed to be using PEM files. JB gave you different advice to check the
> key size and perhaps algorithm choices in the shell.cfg file. He's most
> likely right as he knows karaf inside and out and I was guessing :)

Sorry for the misattribution.

GIven that the code at
org.apache.karaf.shell.ssh.Activator#createSshServer uses
SimpleGeneratorHostKeyProvider, this isn't going to work. I read the
relevant source. That class ignores JB's values when reading, and then
generates a key if it can't read. It only reads from serialized Java.

I feel a patch coming on.


> On Sun, Jul 26, 2015 at 7:29 AM Benson Margulies <be...@basistech.com>
> wrote:
>>
>> JB, according to the thread you linked, somehow I have to convince
>> Karaf to use PEMGeneratorHostKeyProvider. I'll regenerate the key and
>> see if by some happy accident it somehow tries to use it to read the
>> key.
>>
>>
>> On Sun, Jul 26, 2015 at 12:26 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>
>> wrote:
>> > Hi,
>> >
>> > can you check in etc/org.apache.karaf.shell.cfg that the keySize and
>> > algorithm properties match you generated key.
>> >
>> > As the default is DSA (in etc/org.apache.karaf.shell.cfg), and as you
>> > created a RSA key, I bet the problem is there.
>> >
>> > Regards
>> > JB
>> >
>> > On 07/26/2015 04:35 AM, Benson Margulies wrote:
>> >>
>> >> 2015-07-26 02:27:19,841 | WARN  | c]-nio2-thread-1 |
>> >> SimpleGeneratorHostKeyProvider   | 128 - org.apache.sshd.core - 0.14.0
>> >> | Unable to read key /opt/karaf/apache-karaf/etc/ssh/docker:
>> >> java.io.StreamCorruptedException: invalid stream header: 2D2D2D2D
>> >>
>> >> That's an ssh RSA private key, generated with ssh-keygen. Does it have
>> >> to be PEM, or DSA, or both, or something?
>> >>
>> >
>> > --
>> > Jean-Baptiste Onofré
>> > jbonofre@apache.org
>> > http://blog.nanthrax.net
>> > Talend - http://www.talend.com

Re: ssh keys

Posted by James Carman <ja...@carmanconsulting.com>.
That was me. I just googled for the same error message and it looked like
they needed to be using PEM files. JB gave you different advice to check
the key size and perhaps algorithm choices in the shell.cfg file. He's most
likely right as he knows karaf inside and out and I was guessing :)
On Sun, Jul 26, 2015 at 7:29 AM Benson Margulies <be...@basistech.com>
wrote:

> JB, according to the thread you linked, somehow I have to convince
> Karaf to use PEMGeneratorHostKeyProvider. I'll regenerate the key and
> see if by some happy accident it somehow tries to use it to read the
> key.
>
>
> On Sun, Jul 26, 2015 at 12:26 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>
> wrote:
> > Hi,
> >
> > can you check in etc/org.apache.karaf.shell.cfg that the keySize and
> > algorithm properties match you generated key.
> >
> > As the default is DSA (in etc/org.apache.karaf.shell.cfg), and as you
> > created a RSA key, I bet the problem is there.
> >
> > Regards
> > JB
> >
> > On 07/26/2015 04:35 AM, Benson Margulies wrote:
> >>
> >> 2015-07-26 02:27:19,841 | WARN  | c]-nio2-thread-1 |
> >> SimpleGeneratorHostKeyProvider   | 128 - org.apache.sshd.core - 0.14.0
> >> | Unable to read key /opt/karaf/apache-karaf/etc/ssh/docker:
> >> java.io.StreamCorruptedException: invalid stream header: 2D2D2D2D
> >>
> >> That's an ssh RSA private key, generated with ssh-keygen. Does it have
> >> to be PEM, or DSA, or both, or something?
> >>
> >
> > --
> > Jean-Baptiste Onofré
> > jbonofre@apache.org
> > http://blog.nanthrax.net
> > Talend - http://www.talend.com
>

Re: ssh keys

Posted by Benson Margulies <be...@basistech.com>.
JB, according to the thread you linked, somehow I have to convince
Karaf to use PEMGeneratorHostKeyProvider. I'll regenerate the key and
see if by some happy accident it somehow tries to use it to read the
key.


On Sun, Jul 26, 2015 at 12:26 AM, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
> Hi,
>
> can you check in etc/org.apache.karaf.shell.cfg that the keySize and
> algorithm properties match you generated key.
>
> As the default is DSA (in etc/org.apache.karaf.shell.cfg), and as you
> created a RSA key, I bet the problem is there.
>
> Regards
> JB
>
> On 07/26/2015 04:35 AM, Benson Margulies wrote:
>>
>> 2015-07-26 02:27:19,841 | WARN  | c]-nio2-thread-1 |
>> SimpleGeneratorHostKeyProvider   | 128 - org.apache.sshd.core - 0.14.0
>> | Unable to read key /opt/karaf/apache-karaf/etc/ssh/docker:
>> java.io.StreamCorruptedException: invalid stream header: 2D2D2D2D
>>
>> That's an ssh RSA private key, generated with ssh-keygen. Does it have
>> to be PEM, or DSA, or both, or something?
>>
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com

Re: ssh keys

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

can you check in etc/org.apache.karaf.shell.cfg that the keySize and 
algorithm properties match you generated key.

As the default is DSA (in etc/org.apache.karaf.shell.cfg), and as you 
created a RSA key, I bet the problem is there.

Regards
JB

On 07/26/2015 04:35 AM, Benson Margulies wrote:
> 2015-07-26 02:27:19,841 | WARN  | c]-nio2-thread-1 |
> SimpleGeneratorHostKeyProvider   | 128 - org.apache.sshd.core - 0.14.0
> | Unable to read key /opt/karaf/apache-karaf/etc/ssh/docker:
> java.io.StreamCorruptedException: invalid stream header: 2D2D2D2D
>
> That's an ssh RSA private key, generated with ssh-keygen. Does it have
> to be PEM, or DSA, or both, or something?
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: ssh keys

Posted by James Carman <ja...@carmanconsulting.com>.
Try PEM
http://apache-mina.10907.n7.nabble.com/Serious-issue-in-SimpleGeneratorHostKeyProvider-class-td41924.html

On Sat, Jul 25, 2015 at 10:35 PM Benson Margulies <be...@basistech.com>
wrote:

> 2015-07-26 02:27:19,841 | WARN  | c]-nio2-thread-1 |
> SimpleGeneratorHostKeyProvider   | 128 - org.apache.sshd.core - 0.14.0
> | Unable to read key /opt/karaf/apache-karaf/etc/ssh/docker:
> java.io.StreamCorruptedException: invalid stream header: 2D2D2D2D
>
> That's an ssh RSA private key, generated with ssh-keygen. Does it have
> to be PEM, or DSA, or both, or something?
>