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

Re: Something wrong?


Hmm, i still have the same problem.

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_autopubkey(tunnel->ssh, NULL);*
 //ssh_userauth_password (tunnel->ssh, tunnel->username, tunnel->password);
 g_debug ("==params===  %s@%s:%d", tunnel->username, tunnel->hostname,
tunnel->port);

if (ret == SSH_AUTH_ERROR)
 {
 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);
 }

and here is stdout:

** (lt-gsql:4921): DEBUG: ==params===  fantom@xxxxxxxxxxxxxxxxxxx:22
** (lt-gsql:4921): DEBUG: plugin tunnel (halturin.blabla.net): auth failed
[Sending SSH2_MSG_SERVICE_REQUEST failed.]

but if i use the shell:

fantom@xxxxxxxxxxxxxxxx:~$ ssh halturin.blabla.net
Linux halturin 2.6.31-20-generic #57-Ubuntu SMP Mon Feb 8 09:02:26 UTC 2010
x86_64

To access official Ubuntu documentation, please visit:
http://help.ubuntu.com/

3 packages can be updated.
0 updates are security updates.

Last login: Mon Mar 15 11:44:53 2010 from ghost.blabla.net
fantom@halturin:~$

as you can see the auth by key is successfully without any questions. so
strange :(.

btw, i'm using 0.4.1 version.

ALSO! i have noticed if i call ssh_connect(tunnel) before
ssh_userauth_autopubkey everythings works fine. So what the question? *why
do i need to call ssh_connect(..) function first?* There is no one tip about
such behaviour in the documentation i have read.


On Fri, Mar 12, 2010 at 11:33 AM, Taras Halturin <halturin@xxxxxxxxx> wrote:

> Oops, i didnt know about it. Thank you, very very much! :)
>
>
> On Fri, Mar 12, 2010 at 11:27 AM, Andreas Schneider <mail@xxxxxxxxxxxx>wrote:
>
>> On Friday 12 March 2010 09:26:30 you wrote:
>> > 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.
>>
>> Have you enabled PasswordAuthentication on the server? Normally this is
>> disabled...
>>
>> You should use keyboard-interactive mode...
>>
>>
>>        -- andreas
>>
>>
>>
>

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