# Net/ssh unsupported algorithm: DSS1withDSA (OpenSSL::PKey::PKeyError)

**URL:** <https://www.ruby-forum.com/t/net-ssh-unsupported-algorithm-dss1withdsa-openssl-pkeyerror/144418>\
**Category:** Ruby\
**Created:** [July 29, 2008, 2:46pm UTC](https://www.ruby-forum.com/t/net-ssh-unsupported-algorithm-dss1withdsa-openssl-pkeyerror/144418 "2008-07-29T14:46:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Une\_BSSSSvS\_ue](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/2acd7d/32.png) [@Une\_BSSSSvS\_ue](https://www.ruby-forum.com/u/Une_BSSSSvS_ue)\
**Post date:** [July 29, 2008, 2:46pm UTC](https://www.ruby-forum.com/t/net-ssh-unsupported-algorithm-dss1withdsa-openssl-pkeyerror/144418/1 "2008-07-29T14:46:00Z")

</div>

I’ve migrated from CRuby to jRuby with the same code for ssh connection.  
However, within jRuby i get this error message :  
Exception in thread “AWT-EventQueue-0”  
/opt/jruby/lib/ruby/gems/1.8/gems/net-ssh-2.0.3/lib/net/ssh/transport/ke  
x/diffie\_hellman\_group1\_sha1.rb:187:in `ssh_do_verify': unsupported algorithm: DSS1withDSA (OpenSSL::PKey::PKeyError) from /opt/jruby/lib/ruby/gems/1.8/gems/net-ssh-2.0.3/lib/net/ssh/transport/ke x/diffie_hellman_group1_sha1.rb:187:in`verify\_signature’

this is just after :

- kex: diffie-hellman-group1-sha1
- host\_key: ssh-dss
- encryption\_server: aes128-cbc
- encryption\_client: aes128-cbc
- hmac\_client: hmac-sha1
- hmac\_server: hmac-sha1
- compression\_client: none
- compression\_server: none
- language\_client:
- language\_server:  
D, [2008-07-29T14:32:30.388000 #8221] DEBUG –  
net.ssh.transport.algorithms[2e]: exchanging keys  
D, [2008-07-29T14:32:39.914000 #8221] DEBUG – tcpsocket[2c]: queueing  
packet nr 1 type 30 len 140  
D, [2008-07-29T14:32:39.919000 #8221] DEBUG – tcpsocket[2c]: sent 144  
bytes  
D, [2008-07-29T14:32:39.931000 #8221] DEBUG – tcpsocket[2c]: received  
packet nr 1 type 2 len 12  
D, [2008-07-29T14:32:39.937000 #8221] DEBUG –  
net.ssh.transport.session[22]: IGNORE packet recieved: “”  
D, [2008-07-29T14:32:40.544000 #8221] DEBUG – tcpsocket[2c]: read 656  
bytes  
D, [2008-07-29T14:32:40.683000 #8221] DEBUG – tcpsocket[2c]: received  
packet nr 2 type 31 len 636

i think here net/ssh makes use of OpenSSL (even if I didn’t require it)

which dislike ssh-dss for host-key.

the better, for me, would be to avoid using OpenSSL but i don’t know how  
to…

also, at the beginning i had only a dsa pair and, because of that prob  
I’ve genrerated a rsa one.

no change.

also I’ve renammed the known\_hosts file in order to generate another one  
with this new rsa key.

abviously, no change …

---

<div class="post-metadata">

**Author:** ![Une\_BSSSSvS\_ue](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/2acd7d/32.png) [@Une\_BSSSSvS\_ue](https://www.ruby-forum.com/u/Une_BSSSSvS_ue)\
**Post date:** [July 29, 2008, 6:49pm UTC](https://www.ruby-forum.com/t/net-ssh-unsupported-algorithm-dss1withdsa-openssl-pkeyerror/144418/2 "2008-07-29T18:49:16Z")

</div>

Une BÃ©vue wrote:

> I’ve migrated from CRuby to jRuby with the same code for ssh connection.  
> However, within jRuby i get this error message :  
> Exception in thread “AWT-EventQueue-0”  
> /opt/jruby/lib/ruby/gems/1.8/gems/net-ssh-2.0.3/lib/net/ssh/transport/ke  
> x/diffie\_hellman\_group1\_sha1.rb:187:in `ssh_do_verify': unsupported algorithm: DSS1withDSA (OpenSSL::PKey::PKeyError) from /opt/jruby/lib/ruby/gems/1.8/gems/net-ssh-2.0.3/lib/net/ssh/transport/ke x/diffie_hellman_group1_sha1.rb:187:in`verify\_signature’

I assume you’ve installed JRuby-OpenSSL, so what’s probably happening  
here is that either JRuby-OpenSSL doesn’t support that algorithm or the  
encryption library it ships with doesn’t support that algorithm. JOSSL  
uses BouncyCastle…so I’m checking their docs now.

- Charlie

---

<div class="post-metadata">

**Author:** ![Une\_BSSSSvS\_ue](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/2acd7d/32.png) [@Une\_BSSSSvS\_ue](https://www.ruby-forum.com/u/Une_BSSSSvS_ue)\
**Post date:** [July 29, 2008, 6:55pm UTC](https://www.ruby-forum.com/t/net-ssh-unsupported-algorithm-dss1withdsa-openssl-pkeyerror/144418/3 "2008-07-29T18:55:10Z")

</div>

Une BÃ©vue wrote:

> I’ve migrated from CRuby to jRuby with the same code for ssh connection.  
> However, within jRuby i get this error message :  
> Exception in thread “AWT-EventQueue-0”  
> /opt/jruby/lib/ruby/gems/1.8/gems/net-ssh-2.0.3/lib/net/ssh/transport/ke  
> x/diffie\_hellman\_group1\_sha1.rb:187:in `ssh_do_verify': unsupported algorithm: DSS1withDSA (OpenSSL::PKey::PKeyError) from /opt/jruby/lib/ruby/gems/1.8/gems/net-ssh-2.0.3/lib/net/ssh/transport/ke x/diffie_hellman_group1_sha1.rb:187:in`verify\_signature’

FWIW I’m not sure net/ssh has ever had the last bugs worked out in  
JRuby, but we’re willing to sit down and fix them. Perhaps you could  
stop by #jruby and we’ll see what we can do?

- Charlie

---

<div class="post-metadata">

**Author:** ![Une\_BSSSSvS\_ue](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/2acd7d/32.png) [@Une\_BSSSSvS\_ue](https://www.ruby-forum.com/u/Une_BSSSSvS_ue)\
**Post date:** [July 29, 2008, 7:05pm UTC](https://www.ruby-forum.com/t/net-ssh-unsupported-algorithm-dss1withdsa-openssl-pkeyerror/144418/4 "2008-07-29T19:05:46Z")

</div>

Charles Oliver N. wrote:

> I assume you’ve installed JRuby-OpenSSL, so what’s probably happening  
> here is that either JRuby-OpenSSL doesn’t support that algorithm or the  
> encryption library it ships with doesn’t support that algorithm. JOSSL  
> uses BouncyCastle…so I’m checking their docs now.

Disclaimer: I know practically nothing about cryptography.

After a little poking around, it looks like the only references to  
DSS1withDSA on the whole interwebs are the ones associated with this  
thread. So it looks to me like somewhere in JOSSL we’re supposed to be  
translating DSS1 to SHA1 (which from most references appear to be  
basically the same) and looking for SHA1withDSA, which BouncyCastle  
_does_ support. So it seems to be a translation problem in JOSSL. Can  
you file a bug for it please?

[http://jira.codehaus.org/browse/JRUBY](http://jira.codehaus.org/browse/JRUBY)

- Charlie

---

<div class="post-metadata">

**Author:** ![Une\_BSSSSvS\_ue](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/2acd7d/32.png) [@Une\_BSSSSvS\_ue](https://www.ruby-forum.com/u/Une_BSSSSvS_ue)\
**Post date:** [July 30, 2008, 11:25pm UTC](https://www.ruby-forum.com/t/net-ssh-unsupported-algorithm-dss1withdsa-openssl-pkeyerror/144418/5 "2008-07-30T23:25:35Z")

</div>

Charles Oliver N. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> FWIW I’m not sure net/ssh has ever had the last bugs worked out in  
> JRuby, but we’re willing to sit down and fix them. Perhaps you could  
> stop by #jruby and we’ll see what we can do?

OK !
