Archive Index
This month's Index
|
Subject: RE: IPv6 Support Query
RE: IPv6 Support Query
From: Kumar, Ashish <Ashish.Kumar_at_ca.com>
Date: Mon, 21 Dec 2009 12:15:36 +0530
Hello ,
Further to my investigation , I see some issues with below method .
int _libssh2_transport_read(LIBSSH2_SESSION * session)
in transport.c
Background : I have a linux BOX with IPv4 & IPv6 stack and IPv6 address
I have created socket using IP4 address and port 22 and I did so because
I have used "libssh2_userauth_password" method for password
int _libssh2_transport_read(LIBSSH2_SESSION * session)
to read from socket and data is even read from socket as in the below
nread =
_libssh2_recv(session->socket_fd, &p->buf[remainbuf],
PACKETBUFSIZE - remainbuf,
LIBSSH2_SOCKET_RECV_FLAGS(session));
And even below call shows the data in encrypted format
debugdump(session, "libssh2_transport_read() raw",&p->buf[remainbuf],
but as a result of call to below method
rc = decrypt(session, &p->buf[p->readidx], block, blocksize);
"p->buf" & "block" becomes an empty string with rc = 0 .
Although "p->init" as well as "p->buf" are empty string . Even "block"
Furthere there is a call to
p->padding_length = block[4]; where-in Junk value is copied .
Further down below operation copies junk value
memcpy(p->wptr, &block[5], blocksize - 5);
Below method further down return 51.
rc = fullpacket(session, encrypted);
when I see in
static int
userauth_password(LIBSSH2_SESSION *session, const char *username,
unsigned int username_len, const char *password,
unsigned int password_len,
LIBSSH2_PASSWD_CHANGEREQ_FUNC((*passwd_change_cb)))
I see that
session->userauth_pswd_data[0] = 3
in password_response:
And finally there is a return of value "-1" meaning password
On the contrary , I am easily able to login using putty using same user
I am sorry for being bit elaborate , but please help me identifying my
Thanks
Ashish
From: libssh2-devel-bounces_at_cool.haxx.se
I use libssh2 just fine with both IPv6 & IPv4. Your program is the one
-- Jeremy Knope / Software Developer / Ambrosia Software, Inc. -- http://www.AmbrosiaSW.com/ On Dec 18, 2009, at 8:11 AM, Kumar, Ashish wrote: Can you please tell me if libssh2 supports IPv6 ssh ? acm-suse9:/proc # lsof -i :22 COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME sshd 4972 root 3u IPv6 7480 TCP *:ssh (LISTEN) sshd 25032 root 4u IPv6 287309 TCP acm-suse9.ca.com:ssh->kumas09-xp.ca.com:dsdn (ESTABLISHED) sshd 25348 root 4u IPv6 288321 TCP acm-suse9.ca.com:ssh->kumas09-xp.ca.com:gv-us (ESTABLISHED) "while ((rc = libssh2_userauth_password(session, username, password)) == LIBSSH2_ERROR_EAGAIN);" this method is always returning -1 . Thanks & Regards, Ashish Kumar _______________________________________________ libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
_______________________________________________
|