# Net::SSH is broken

**URL:** <https://rubytalk.org/t/net-ssh-is-broken/70354>\
**Category:** ruby-talk\
**Created:** [7 October 2014 17:56 UTC](https://rubytalk.org/t/net-ssh-is-broken/70354 "2014-10-07T17:56:46Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt\_Lawrence1](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@Matt\_Lawrence1](https://rubytalk.org/u/Matt_Lawrence1)\
**Post date:** [7 October 2014 17:56 UTC](https://rubytalk.org/t/net-ssh-is-broken/70354/1 "2014-10-07T17:56:46Z")

</div>

I haven't used Ruby for several months and now Net::SSH gives me an AuthenticationFailed when I try to hand it a user and password. SInce this is the single most useful library I have for doing automation, I am in a world of hurt. How can I fix this?

-- Matt  
It's not what I know that counts.  
It's what I can remember in time to use.

---

<div class="post-metadata">

**Author:** ![Raj\_Sahae](https://yyz1.discourse-cdn.com/flex029/user_avatar/rubytalk.org/raj_sahae/32/1840_2.png) [@Raj\_Sahae](https://rubytalk.org/u/Raj_Sahae)\
**Post date:** [7 October 2014 18:27 UTC](https://rubytalk.org/t/net-ssh-is-broken/70354/2 "2014-10-07T18:27:53Z")

</div>

I also use Net::SSH a lot in my automation and it works fine. Can you show  
us the error that you are getting and the code that causes the error? Also,  
what version of net::ssh are you using?

> I haven't used Ruby for several months and now Net::SSH gives me an

AuthenticationFailed when I try to hand it a user and password. SInce this  
is the single most useful library I have for doing automation, I am in a  
world of hurt. How can I fix this?

> **···**
>
> On Tuesday, October 7, 2014, Matt Lawrence \<matt@technoronin.com\> wrote:
> 
> > -- Matt  
> > It's not what I know that counts.  
> > It's what I can remember in time to use.
> 
> --  
> -Raj

---

<div class="post-metadata">

**Author:** ![Hassan\_Schroeder](https://yyz1.discourse-cdn.com/flex029/user_avatar/rubytalk.org/hassan_schroeder/32/1838_2.png) [@Hassan\_Schroeder](https://rubytalk.org/u/Hassan_Schroeder)\
**Post date:** [7 October 2014 18:58 UTC](https://rubytalk.org/t/net-ssh-is-broken/70354/3 "2014-10-07T18:58:36Z")

</div>

Versions of Ruby / Net::SSH / OpenSSL?

Have you tried cloning the Net::SSH repo and running the tests on  
your system?

A reproducible test case would certainly help (because it works fine  
for me in a single very simple test).

> **···**
>
> On Tue, Oct 7, 2014 at 10:56 AM, Matt Lawrence \<matt@technoronin.com\> wrote:
> 
> > I haven't used Ruby for several months and now Net::SSH gives me an  
> > AuthenticationFailed when I try to hand it a user and password.
> 
> --  
> Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
> 
> > **[Hassan Schroeder on about.me](https://about.me/hassanschroeder)**
> >
> > I use about.me to show people what matters most to me.
> 
> twitter: @hassan

---

<div class="post-metadata">

**Author:** ![Matt\_Lawrence1](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@Matt\_Lawrence1](https://rubytalk.org/u/Matt_Lawrence1)\
**Post date:** [7 October 2014 19:33 UTC](https://rubytalk.org/t/net-ssh-is-broken/70354/4 "2014-10-07T19:33:59Z")

</div>

I have narrowed it down and it is failing when trying to connect to an Oracle ILOM. The ilom is running a version of OpenSSH

pastebin.com/M1GuAeq0

-- Matt  
It's not what I know that counts.  
It's what I can remember in time to use.

> **···**
>
> On Tue, 7 Oct 2014, Hassan Schroeder wrote:
> 
> > On Tue, Oct 7, 2014 at 10:56 AM, Matt Lawrence \<matt@technoronin.com\> wrote:
> > 
> > > I haven't used Ruby for several months and now Net::SSH gives me an  
> > > AuthenticationFailed when I try to hand it a user and password.
> > 
> > Versions of Ruby / Net::SSH / OpenSSL?
> > 
> > Have you tried cloning the Net::SSH repo and running the tests on  
> > your system?
> > 
> > A reproducible test case would certainly help (because it works fine  
> > for me in a single very simple test).

---

<div class="post-metadata">

**Author:** ![Juanjo\_Conti](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@Juanjo\_Conti](https://rubytalk.org/u/Juanjo_Conti)\
**Post date:** [7 October 2014 18:31 UTC](https://rubytalk.org/t/net-ssh-is-broken/70354/5 "2014-10-07T18:31:03Z")

</div>

Maybe the password in server side had changed?

> **···**
>
> 2014-10-07 14:56 GMT-03:00 Matt Lawrence \<matt@technoronin.com\>:
> 
> > I haven't used Ruby for several months and now Net::SSH gives me an  
> > AuthenticationFailed when I try to hand it a user and password. SInce this  
> > is the single most useful library I have for doing automation, I am in a  
> > world of hurt. How can I fix this?
> > 
> > -- Matt  
> > It's not what I know that counts.  
> > It's what I can remember in time to use.
> 
> --  
> Juanjo Conti  
> Mi primer novela ya se puede conseguir en:
> 
> > **[juanjoconti.com.ar](http://www.juanjoconti.com.ar/xolopes)**
> >
> > This domain may be for sale!

---

<div class="post-metadata">

**Author:** ![Hassan\_Schroeder](https://yyz1.discourse-cdn.com/flex029/user_avatar/rubytalk.org/hassan_schroeder/32/1838_2.png) [@Hassan\_Schroeder](https://rubytalk.org/u/Hassan_Schroeder)\
**Post date:** [7 October 2014 20:18 UTC](https://rubytalk.org/t/net-ssh-is-broken/70354/6 "2014-10-07T20:18:51Z")

</div>

Oh, dear 🙂 OS in firmware? Probably going to be hard to get any  
real details about that without an Oracle support contract.

It appears that this thing supports publickey access - maybe give that  
a try, at least to compare?

> **···**
>
> On Tue, Oct 7, 2014 at 12:33 PM, Matt Lawrence \<matt@technoronin.com\> wrote:
> 
> > I have narrowed it down and it is failing when trying to connect to an  
> > Oracle ILOM.
> 
> --  
> Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
> 
> > **[Hassan Schroeder on about.me](https://about.me/hassanschroeder)**
> >
> > I use about.me to show people what matters most to me.
> 
> twitter: @hassan

---

<div class="post-metadata">

**Author:** ![Matt\_Lawrence1](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@Matt\_Lawrence1](https://rubytalk.org/u/Matt_Lawrence1)\
**Post date:** [7 October 2014 18:37 UTC](https://rubytalk.org/t/net-ssh-is-broken/70354/7 "2014-10-07T18:37:28Z")

</div>

No, I even doublechecked by logging in manually

-- Matt  
It's not what I know that counts.  
It's what I can remember in time to use.

> **···**
>
> On Tue, 7 Oct 2014, Juanjo Conti wrote:
> 
> > Maybe the password in server side had changed?

---

<div class="post-metadata">

**Author:** ![Matt\_Lawrence1](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@Matt\_Lawrence1](https://rubytalk.org/u/Matt_Lawrence1)\
**Post date:** [7 October 2014 20:27 UTC](https://rubytalk.org/t/net-ssh-is-broken/70354/8 "2014-10-07T20:27:16Z")

</div>

Security folks say no ssh keys. It's frustrating.

-- Matt  
It's not what I know that counts.  
It's what I can remember in time to use.

> **···**
>
> On Tue, 7 Oct 2014, Hassan Schroeder wrote:
> 
> > On Tue, Oct 7, 2014 at 12:33 PM, Matt Lawrence \<matt@technoronin.com\> wrote:
> > 
> > > I have narrowed it down and it is failing when trying to connect to an  
> > > Oracle ILOM.
> > 
> > Oh, dear 🙂 OS in firmware? Probably going to be hard to get any  
> > real details about that without an Oracle support contract.
> > 
> > It appears that this thing supports publickey access - maybe give that  
> > a try, at least to compare?

---

<div class="post-metadata">

**Author:** ![Eric\_MSP\_Veith](https://avatars.discourse-cdn.com/v4/letter/e/ecd19e/32.png) [@Eric\_MSP\_Veith](https://rubytalk.org/u/Eric_MSP_Veith)\
**Post date:** [7 October 2014 20:54 UTC](https://rubytalk.org/t/net-ssh-is-broken/70354/9 "2014-10-07T20:54:16Z")

</div>

Does it need a TTY allocated? Try, for example, "ssh -lroot dssmgmt18601 ls"  
and see what happens, because this way, no TTY is allocated and it would mimic  
what Net::SSH is doing.

Although the pastebin says "invalid credentials", authentication succeeds and  
a channel is requested. Interaction with the channel fails, after everything  
is already set up. Hopefully it is not an issue of exit-status vs. exit-signal  
[0]. If it was, it would be up to Net::SSH to patch, but it's quite easy to  
catch. I don't know which packet types these are, but the RFC will tell us  
that easily.

HTH.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--- Eric

[0]  
[http://h10025.www1.hp.com/ewfrf/wc/document?cc=us&lc=en&dlc=en&tmp\_geoLoc=true&docname=c03918474](http://h10025.www1.hp.com/ewfrf/wc/document?cc=us&lc=en&dlc=en&tmp_geoLoc=true&docname=c03918474)

> **···**
>
> On Tuesday 07 October 2014, 14:33:59, Matt Lawrence wrote:
> 
> > I have narrowed it down and it is failing when trying to connect to an  
> > Oracle ILOM. The ilom is running a version of OpenSSH
> > 
> > pastebin.com/M1GuAeq0

---

<div class="post-metadata">

**Author:** ![Matt\_Lawrence1](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@Matt\_Lawrence1](https://rubytalk.org/u/Matt_Lawrence1)\
**Post date:** [7 October 2014 21:01 UTC](https://rubytalk.org/t/net-ssh-is-broken/70354/10 "2014-10-07T21:01:15Z")

</div>

Good catch, that's what it's doing. Now I need to figure out a workaround. In the meantime, I did all of it by hand.

-- Matt  
It's not what I know that counts.  
It's what I can remember in time to use.

> **···**
>
> On Tue, 7 Oct 2014, Eric MSP Veith wrote:
> 
> > On Tuesday 07 October 2014, 14:33:59, Matt Lawrence wrote:
> > 
> > > I have narrowed it down and it is failing when trying to connect to an  
> > > Oracle ILOM. The ilom is running a version of OpenSSH
> > > 
> > > pastebin.com/M1GuAeq0
> > 
> > Does it need a TTY allocated? Try, for example, "ssh -lroot dssmgmt18601 ls"  
> > and see what happens, because this way, no TTY is allocated and it would mimic  
> > what Net::SSH is doing.
> > 
> > Although the pastebin says "invalid credentials", authentication succeeds and  
> > a channel is requested. Interaction with the channel fails, after everything  
> > is already set up. Hopefully it is not an issue of exit-status vs. exit-signal  
> > [0]. If it was, it would be up to Net::SSH to patch, but it's quite easy to  
> > catch. I don't know which packet types these are, but the RFC will tell us  
> > that easily.

---

<div class="post-metadata">

**Author:** ![Eric\_MSP\_Veith](https://avatars.discourse-cdn.com/v4/letter/e/ecd19e/32.png) [@Eric\_MSP\_Veith](https://rubytalk.org/u/Eric_MSP_Veith)\
**Post date:** [8 October 2014 07:40 UTC](https://rubytalk.org/t/net-ssh-is-broken/70354/11 "2014-10-08T07:40:31Z")

</div>

Matt,

> **···**
>
> On Tuesday 07 October 2014, 16:01:15, Matt Lawrence wrote:
> 
> > Good catch, that's what it's doing.
> 
> which one of the two possible issues was it?
> 
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--- Eric

---

<div class="post-metadata">

**Author:** ![Matt\_Lawrence1](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@Matt\_Lawrence1](https://rubytalk.org/u/Matt_Lawrence1)\
**Post date:** [8 October 2014 19:52 UTC](https://rubytalk.org/t/net-ssh-is-broken/70354/12 "2014-10-08T19:52:56Z")

</div>

After giving up yesterday and doing it by hand, I was handed a bunch of other systems to deal with this morning. SInce I had a brilliant idea (if I do say so myself) I gave Net::SSH::Telnet a shot. It worked!

-- Matt  
It's not what I know that counts.  
It's what I can remember in time to use.

> **···**
>
> On Wed, 8 Oct 2014, Eric MSP Veith wrote:
> 
> > Matt,
> > 
> > On Tuesday 07 October 2014, 16:01:15, Matt Lawrence wrote:
> > 
> > > Good catch, that's what it's doing.
> > 
> > which one of the two possible issues was it?

---

<div class="post-metadata">

**Author:** ![Eric\_MSP\_Veith](https://avatars.discourse-cdn.com/v4/letter/e/ecd19e/32.png) [@Eric\_MSP\_Veith](https://rubytalk.org/u/Eric_MSP_Veith)\
**Post date:** [9 October 2014 09:16 UTC](https://rubytalk.org/t/net-ssh-is-broken/70354/13 "2014-10-09T09:16:47Z")

</div>

Did you try the TTY-allocated vs. no-TTY version? Because I would like to  
investigate this bug, but I've got not ILOM handy. If its just the TTY thing,  
it will not really be a bug, but the exit-status vs. exit-signal part would be  
interesting.

Thanks!

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--- Eric

> **···**
>
> On Wednesday 08 October 2014, 14:52:56, Matt Lawrence wrote:
> 
> > On Wed, 8 Oct 2014, Eric MSP Veith wrote:  
> > \> Matt,  
> > \>  
> > \> On Tuesday 07 October 2014, 16:01:15, Matt Lawrence wrote:  
> > \>\> Good catch, that's what it's doing.  
> > \>  
> > \> which one of the two possible issues was it?
> > 
> > After giving up yesterday and doing it by hand, I was handed a bunch of  
> > other systems to deal with this morning. SInce I had a brilliant idea (if  
> > I do say so myself) I gave Net::SSH::Telnet a shot. It worked!
