From: Cliff Rosson Date: 2013-05-09T02:43:58+09:00 Subject: Re: Connect to a switch with SSH --e89a8ff24e9574917104dc387a48 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable For my ssh class it is simply >> ssh =3D SSH.new({:user =3D> USERNAME, :password =3D> PASSWORD, :host =3D= > CISCO, :prompt =3D> /.*>|.*#/} ... >> puts ssh.errors =3D> false >> puts ssh.cmd("show run") =3D> ... Just used it. Works fine. Can you authenticate to the cisco device using basic SSH? ssh yourusername@ciscodevice On Wed, May 8, 2013 at 9:53 AM, Rud=E1 G. wrote: > I tried your class and it throws an exception. The output of the > exception is the USER value. > > Also I tried only this: > > @ssh_session =3D Net::SSH.start(CISCO, USER, :password =3D> PASS, :keys = =3D> > []) > @ssh =3D Net::SSH::Telnet.new("Session" =3D> @ssh_session, "Prompt" =3D> > /.*>|.*#/) > > and I got the Net::SSH::AuthenticationFailed error > > I dont know why the authentication fails if in the 'login as' field you > can enter any value... > > -- > Posted via http://www.ruby-forum.com/. > > --=20 vizualize.me/cliffrosson --e89a8ff24e9574917104dc387a48 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
For my ssh class it is simply

>> ssh =3D SSH.new({:user =3D> USERN= AME, :password =3D> PASSWORD, :host =3D> CISCO, :prompt =3D> /.*&g= t;|.*#/}
...
>> puts ssh.errors
=3D> false
>> puts ssh.cmd("show run&qu= ot;)
=3D> ...

Just used it. Works fine. Can you authenticate to th= e cisco device using basic SSH?

ssh yourusername@ciscodevice



On Wed, May 8, 2013 at 9:53 AM, Rud=E1 G= . <lists@ruby-forum.com> wrote:
I tried your class and it throws an exception. The output of the
exception is the USER value.

Also I tried only this:

@ssh_session =3D Net::SSH.start(CISCO, USER, :password =3D> PASS, :keys = =3D>
[])
@ssh =3D Net::SSH::Telnet.new("Session" =3D> @ssh_session, &qu= ot;Prompt" =3D>
/.*>|.*#/)

and I got the Net::SSH::AuthenticationFailed error

I dont know why the authentication fails if in the 'login as' field= you
can enter any value...



--
=
vizualiz= e.me/cliffrosson
--e89a8ff24e9574917104dc387a48--