Subject: Re: bad username/password auth to Mac OS X/FreeBSD hosts.

Re: bad username/password auth to Mac OS X/FreeBSD hosts.

From: Mikhail Gusarov <dottedmag_at_dottedmag.net>
Date: Thu, 29 May 2014 18:54:38 +0200

Hi.

Some configurations enable "password" password authentication, others
enable "keyboard-interactive" password authentication. Yes, it is
confusing. And yes, it is what forced me to implement keyboard-interactive
authentication in libssh2 in first place.

If you run ssh -v, you'll see "Authentications that can continue" lines in
the output. First one contains a full list of authentication methods
accepted by the server. I'm pretty sure the hosts which you can't connect
to using libssh2 will not have "password" init, but "keyboard-interactive"
only.

Best regards,
Mikhail Gusarov.

On Thu, May 29, 2014 at 6:39 PM, B Harder <brad.harder_at_gmail.com> wrote:

> Hey Mikhail -- thanks for the response.
>
> I can use canonical ssh (OpenSSH) to authenticate and successfully
> connect to the hosts in question. I'm certainly _not_ beyond finding
> out the problem is with my code -- but I'm pretty curious how I can
> successfully (repeatedly) connect to some "class" of hosts, but not
> others.
>
> I'll see if I can tailor the sftp example to demonstrate my issue.
>
> Otherwise, I take it there are no known issues regarding FreeBSD/Mac
> OS X? (I wouldn't be surprised if their code/network stack is very
> closely related -- I've been experiencing my OS X problem for weeks
> now, and occasionally poking at the code to find a pain point -- when
> I experienced same issue with FreeBSD, I decided to post here for
> other people's experiences).
>
>
> -bch
>
> On 5/29/14, Mikhail Gusarov <dottedmag_at_dottedmag.net> wrote:
> > Probably those hosts disable password authentication and only enable
> > keyboard-interactive one.
> >
> > Check out http://www.libssh2.org/examples/sftp.html
> >
> >
> >
> > Best regards,
> > Mikhail Gusarov.
> >
> >
> > On Thu, May 29, 2014 at 6:20 PM, B Harder <brad.harder_at_gmail.com> wrote:
> >
> >> I've got code that will connect to NetBSD, Solaris, Linux hosts and
> >> authenticate and Do What I Want. However, attempting to connect to a
> >> FreeBSD (10 release) or Mac OS X host yields authentication error. I'm
> >> sure the username/password is correct. If I use key-based
> >> authentication to these problem hosts though, everything works fine.
> >>
> >> Is there a known issue w/ OS X/FreeBSD ? Is there some
> >> boilerplate/reference code available for username/password
> >> authentication to use as basis for example to demonstrate?
> >>
> >> Kind regards,
> >>
> >> -bch
> >> _______________________________________________
> >> libssh2-devel
> http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
> >>
> >
> _______________________________________________
> libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
>

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2014-05-29