[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Something wrong?


Thanx for replay!

I have fixed ...

        tunnel->ssh = ssh_new ();

        snprintf (strport, NI_MAXSERV, "%d", tunnel->port);

        ssh_options_set (tunnel->ssh, SSH_OPTIONS_HOST, tunnel->hostname);
        ssh_options_set (tunnel->ssh, SSH_OPTIONS_USER, tunnel->username);
        ssh_options_set (tunnel->ssh, SSH_OPTIONS_PORT, &tunnel->port);

        ret = ssh_userauth_password (tunnel->ssh, tunnel->username,
tunnel->password);
        g_debug ("=====  %s@%s:%d", tunnel->username, tunnel->hostname,
tunnel->port);

        if (ret != SSH_AUTH_SUCCESS)
        {
                g_debug ("plugin tunnel (%s): auth failed [%s]",
tunnel->name, ssh_get_error (tunnel->ssh));

                tunnel->private->state = GSQLP_TUNNEL_STATE_ERROR;
                //tunnel->autoconnect = FALSE;

                ssh_free (tunnel->ssh);

        }

but...

** (lt-gsql:20569): DEBUG: =====  fantom@xxxxxxxxxxxxx:22
** (lt-gsql:20569): DEBUG: plugin tunnel (my laptop): auth failed [Sending
SSH2_MSG_SERVICE_REQUEST failed.]


about security. i know it. i just want to make it work at least as.

btw, i'm using 0.4.1 version.

$ apt-cache show libssh-4
Package: libssh-4
Source: libssh
Priority: optional
Section: libs
Installed-Size: 320
Maintainer: Ubuntu MOTU Developers <ubuntu-motu@xxxxxxxxxxxxxxxx>
Architecture: amd64
Version: 0.4.1-0~ppa1
Replaces: libssh-2, libssh-3
Depends: libc6 (>= 2.4), libssl0.9.8 (>= 0.9.8f-5), zlib1g (>= 1:1.1.4)
Conflicts: libssh-2, libssh-3
Filename: pool/main/libs/libssh/libssh-4_0.4.1-0~ppa1_amd64.deb


On Fri, Mar 12, 2010 at 11:08 AM, Andreas Schneider <mail@xxxxxxxxxxxx>wrote:

> On Friday 12 March 2010 00:08:38 you wrote:
> > Hi ppl!
> >
> > I have got a problem and don't know what i need to do :(.
> >
> > tunnel->ssh = ssh_new ();
> >
> > snprintf (strport, NI_MAXSERV, "%d", tunnel->localport);
> >
> > ssh_options_set (tunnel->ssh, SSH_OPTIONS_HOST, tunnel->hostname);
> > ssh_options_set (tunnel->ssh, SSH_OPTIONS_USER, tunnel->username);
> > ssh_options_set (tunnel->ssh, SSH_OPTIONS_PORT, strport);
>
> ssh_options_set (tunnel->ssh, SSH_OPTIONS_PORT, &tunnel->localport);
>
> > ret = ssh_userauth_password (tunnel->ssh, tunnel->username,
> > tunnel->password);
>
> Are you sure that you want to use password auth? This is insecure and
> disabled
> by default. Keyboard-Interactive is username + password authentication.
>
> Cheers,
>
>        -- andreas
>
>
>

Follow-Ups:
Re: Something wrong?Andreas Schneider <mail@xxxxxxxxxxxx>
References:
Something wrong?Taras Halturin <halturin@xxxxxxxxx>
Re: Something wrong?Andreas Schneider <mail@xxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org