[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Something wrong?
[Thread Prev] | [Thread Next]
- Subject: Re: Something wrong?
- From: Taras Halturin <halturin@xxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Mon, 15 Mar 2010 20:09:50 +0300
- To: libssh@xxxxxxxxxx
Thanx! You have completely explain this feature! I saw the examples, but actually it is really not so obviously. WBR Taras. PS: It seems soon have to add a new position on yours project page, which lists the programms using this library ;). On Mon, Mar 15, 2010 at 7:29 PM, Aris Adamantiadis <aris@xxxxxxxxxxxx>wrote: > Hello, > > I think you were a little short and forgot to ssh_connect() and > ssh_is_host_known()... > The former is mandatory to simply create the tcp connection and > cryptographic handshake, the second is necessary to be sure you're > connecting to a known host (avoid MiM attacks). > Look at the examples in examples/, you can even copy/paste working code > if you wish. > > Regards, > > Aris > > Taras Halturin a écrit : > > 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 > > <http://fantom@xxxxxxxxxxxxxxxxxxx:22> > > ** (lt-gsql:4921): DEBUG: plugin tunnel (halturin.blabla.net > > <http://halturin.blabla.net>): auth failed [Sending > > SSH2_MSG_SERVICE_REQUEST failed.] > > > > but if i use the shell: > > > > fantom@xxxxxxxxxxxxxxxx:~$ ssh halturin.blabla.net <http://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 > > <http://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 > > <mailto: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 <mailto:mail@xxxxxxxxxxxx>> wrote: > > > > On Friday 12 March 2010 09:26:30 you wrote: > > > but... > > > > > > ** (lt-gsql:20569): DEBUG: ===== fantom@xxxxxxxxxxxxx:22 > > <http://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 > > > > > > > > > > >
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> |
Re: Something wrong? | Taras Halturin <halturin@xxxxxxxxx> |
Re: Something wrong? | Aris Adamantiadis <aris@xxxxxxxxxxxx> |