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

Re: problem with ipv6 address in libssh


Hi,

The logs are written on stdout when you set the verbosity level, as
described in here:
http://api.libssh.org/master/libssh_tutor_guided_tour.html

It is normal that such link-local address does not work. It wouldn't
with openssh client either, because you miss the interface number at the
end (%eth0 for instance). However it is possible that libssh doesn't
support the %interface syntax.

Aris

Le 15/07/13 13:07, Bharath Kumar a écrit :
> Hi,
>          If i use the ipv6 address (::1), ssh_connect function returns
> success.
>          If i user the ipv6 address of the local machine
> (fe80::20c:29ff:feeb:c4f5) it is returning error and the ssh_get_error()
> is  "Socket error: Transport endpoint is not connected" and
>          output of /usr/sbin/sshd -6 -d is
>           
>   <SYS_CTRLI0> root@sixthree:/opt/wasp/log # /usr/sbin/sshd -6 -d
> debug1: sshd version OpenSSH_5.9p1 Debian-5ubuntu1
> debug1: read PEM private key done: type RSA
> debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
> debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
> debug1: private host key: #0 type 1 RSA
> debug1: read PEM private key done: type DSA
> debug1: Checking blacklist file /usr/share/ssh/blacklist.DSA-1024
> debug1: Checking blacklist file /etc/ssh/blacklist.DSA-1024
> debug1: private host key: #1 type 2 DSA
> debug1: read PEM private key done: type ECDSA
> debug1: Checking blacklist file /usr/share/ssh/blacklist.ECDSA-256
> debug1: Checking blacklist file /etc/ssh/blacklist.ECDSA-256
> debug1: private host key: #2 type 3 ECDSA
> debug1: rexec_argv[0]='/usr/sbin/sshd'
> debug1: rexec_argv[1]='-6'
> debug1: rexec_argv[2]='-d'
> Set /proc/self/oom_score_adj from 0 to -1000
> debug1: Bind to port 22 on ::.
> Server listening on :: port 22.
> 
> What is the problem. Does libssh works for ipv6 addresses other than (::1) ?
> 
> Regards,
> Bharath.        
> ------------------------------------------------------------------------
> *From:* Bharath Kumar <bharath_vankadara@xxxxxxxxxxx>
> *To:* "libssh@xxxxxxxxxx" <libssh@xxxxxxxxxx>
> *Sent:* Monday, July 15, 2013 6:48 AM
> *Subject:* Re: problem with ipv6 address in libssh
> 
> Hi,
>         Where are the libssh logs stored ??
> 
> Regards,
> Bharath.
> 
> 
> ------------------------------------------------------------------------
> *From:* Aris Adamantiadis <aris@xxxxxxxxxxxx>
> *To:* Bharath Kumar <bharath_vankadara@xxxxxxxxxxx>
> *Cc:* "libssh@xxxxxxxxxx" <libssh@xxxxxxxxxx>
> *Sent:* Monday, July 15, 2013 6:00 AM
> *Subject:* Re: problem with ipv6 address in libssh
> 
> Hi,
> 
> According to this log, it's working perfectly. Could you provide the log
> generated by libssh itself ?
> A sample of your code would be appreciated as well.
> 
> Aris
> 
> Le 15/07/13 11:50, Bharath Kumar a écrit :
>> Hi,
>>
>> I am using ssh_connect( ) function to connect to the address ::1(ipv6).
>> But it is returning error.
>> I ran sshd daemon in debug mode. Here is the output
>>
>>
>> debug1: sshd version OpenSSH_5.9p1 Debian-5ubuntu1
>> debug1: read PEM private key done: type RSA
>> debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
>> debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
>> debug1: private host key: #0 type 1 RSA
>> debug1: read PEM private key done: type DSA
>> debug1: Checking blacklist file /usr/share/ssh/blacklist.DSA-1024
>> debug1: Checking blacklist file /etc/ssh/blacklist.DSA-1024
>> debug1: private host key: #1 type 2 DSA
>> debug1: read PEM private key done: type ECDSA
>> debug1: Checking blacklist file /usr/share/ssh/blacklist.ECDSA-256
>> debug1: Checking blacklist file /etc/ssh/blacklist.ECDSA-256
>> debug1: private host key: #2 type 3 ECDSA
>> debug1: rexec_argv[0]='/usr/sbin/sshd'
>> debug1: rexec_argv[1]='-d'
>> Set /proc/self/oom_score_adj from 0 to -1000
>> debug1: Bind to port 22 on ::1.
>> Server listening on ::1 port 22.
>> debug1: Server will not fork when running in debugging mode.
>> debug1: rexec start in 4 out 4 newsock 4 pipe -1 sock 7
>> debug1: inetd sockets after dupping: 3, 3
>> Connection from ::1 port 60470
>> debug1: Client protocol version 2.0; client software version libssh-0.5.2
>> debug1: no match: libssh-0.5.2
>> debug1: Enabling compatibility mode for protocol 2.0
>> debug1: Local version string SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1
>> debug1: permanently_set_uid: 116/65534 [preauth]
>> debug1: list_hostkey_types: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256 [preauth]
>> debug1: SSH2_MSG_KEXINIT sent [preauth]
>> debug1: SSH2_MSG_KEXINIT received [preauth]
>> debug1: kex: client->server aes256-ctr hmac-sha1 none [preauth]
>> debug1: kex: server->client aes256-ctr hmac-sha1 none [preauth]
>> debug1: expecting SSH2_MSG_KEXDH_INIT [preauth]
>> debug1: SSH2_MSG_NEWKEYS sent [preauth]
>> debug1: expecting SSH2_MSG_NEWKEYS [preauth]
>> debug1: SSH2_MSG_NEWKEYS received [preauth]
>> debug1: KEX done [preauth]
>> debug1: userauth-request for user bharath service ssh-connection method
>> password [preauth]
>> debug1: attempt 0 failures 0 [preauth]
>> debug1: PAM: initializing for "bharath"
>> debug1: PAM: setting PAM_RHOST to "ip6-localhost"
>> debug1: PAM: setting PAM_TTY to "ssh"
>> debug1: PAM: password authentication accepted for bharath
>> debug1: do_pam_account: called
>> Accepted password for bharath from ::1 port 60470 ssh2
>> debug1: monitor_read_log: child log fd closed
>> debug1: monitor_child_preauth: bharath has been authenticated by
>> privileged process
>> debug1: PAM: establishing credentials
>> User child is on pid 23594
>> debug1: SELinux support disabled
>> debug1: PAM: establishing credentials
>> debug1: permanently_set_uid: 1000/1000
>> debug1: Entering interactive session for SSH2.
>> debug1: server_init_dispatch_20
>> debug1: server_input_channel_open: ctype session rchan 43 win 64000 max
>> 32768
>> debug1: input_session_request
>> debug1: channel 0: new [server-session]
>> debug1: session_new: session 0
>> debug1: session_open: channel 0
>> debug1: session_open: session 0: link with channel 0
>> debug1: server_input_channel_open: confirm session
>> debug1: server_input_channel_req: channel 0 request subsystem reply 1
>> debug1: session_by_channel: session 0 channel 0
>> debug1: session_input_channel_req: session 0 req subsystem
>> subsystem request for sftp by user bharath
>> debug1: subsystem: exec() /usr/lib/openssh/sftp-server
>>
>> Is there anything wrong with this??
>>
> 
> 
> 
> 
> 

References:
problem with ipv6 address in libsshBharath Kumar <bharath_vankadara@xxxxxxxxxxx>
Re: problem with ipv6 address in libsshAris Adamantiadis <aris@xxxxxxxxxxxx>
Re: problem with ipv6 address in libsshBharath Kumar <bharath_vankadara@xxxxxxxxxxx>
Re: problem with ipv6 address in libsshBharath Kumar <bharath_vankadara@xxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org