[X2go-dev] python-x2go and IPv6 ?

Stéphane Graber stgraber at ubuntu.com
Fri May 27 20:36:38 CEST 2011


On Fri, 2011-05-27 at 20:28 +0200, Mike Gabriel wrote:
> Hi Stephane,
> 
> On Fr 27 Mai 2011 16:03:47 CEST Stéphane Graber wrote:
> 
> > stgraber at castiana:~$ host weblive-appserv01.nx.stgraber.org
> > weblive-appserv01.nx.stgraber.org has address 46.4.71.12
> > weblive-appserv01.nx.stgraber.org has IPv6 address
> > 2001:470:b4c2:1025:1::1
> >
> > stgraber at castiana:~$ telnet 46.4.71.12 6522
> > Trying 46.4.71.12...
> > Connected to 46.4.71.12.
> > Escape character is '^]'.
> > SSH-2.0-OpenSSH_5.8p1 Debian-1ubuntu3
> > ^]
> > telnet> quit
> > Connection closed.
> >
> >
> > stgraber at castiana:~$ telnet 2001:470:b4c2:1025:1::1 6522
> > Trying 2001:470:b4c2:1025:1::1...
> > Connected to 2001:470:b4c2:1025:1::1.
> > Escape character is '^]'.
> > SSH-2.0-OpenSSH_5.8p1 Debian-1ubuntu3
> > ^]
> > telnet> quit
> > Connection closed.
> >
> > stgraber at castiana:~$ telnet weblive-appserv01.nx.stgraber.org 6522
> > Trying 2001:470:b4c2:1025:1::1...
> > Connected to weblive-appserv01.nx.stgraber.org.
> > Escape character is '^]'.
> > SSH-2.0-OpenSSH_5.8p1 Debian-1ubuntu3
> > ^]
> > telnet> quit
> > Connection closed.
> 
> Could you try somethin like this...
> 
> $ python
> Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48)
> [GCC 4.4.5] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import socket
> >>> socket.getaddrinfo('vidar.das-netzwerkteam.de', 32032,  
> >>> socket.AF_UNSPEC, socket.SOCK_STREAM)
> [(2, 1, 6, '', ('178.63.100.242', 32032))]
> 
> What is the result of socket.getaddrinfo for your server (from your  
> local host)?
> 
> The getaddrinfo tuple represents (family, socktype, proto, canonname,  
> sockaddr).
> 
> This information is queried by paramiko.SSHClient.connect():
> http://www.lag.net/paramiko/docs/paramiko.client-pysrc.html
> 
> There doesn't seem to be a method to force either of the protocols.
> 
> Greets,
> Mike
> 
> PS: could we please these kinds of communication on x2go-dev ML? I  
> guess our insights should be available for the whole world (mail  
> archives).

>>>
socket.getaddrinfo("weblive-appserv02.nx.stgraber.org",6522,socket.AF_UNSPEC, socket.SOCK_STREAM)
[(10, 1, 6, '', ('2001:470:b4c2:1025:1::2', 6522, 0, 0)), (2, 1, 6, '',
('46.4.71.12', 6522))]


As I mentioned, I have another process using paramiko connecting to the
same server and using IPv6.


May 27 14:35:45 weblive-appserv01 sshd[7373]: Accepted password for root
from 2001:470:8cc0:1000:223:14ff:fea3:d9a4 port 60372 ssh2
May 27 14:35:45 weblive-appserv01 sshd[7373]: pam_unix(sshd:session):
session opened for user root by (uid=0)
May 27 14:35:46 weblive-appserv01 sshd[7373]: pam_unix(sshd:session):
session closed for user root

Using:

#!/usr/bin/python
import paramiko

ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect(
    "weblive-appserv01.nx.stgraber.org",
    port=6522,
    username="root",
    password="MY PASSWORD",
    allow_agent=False,
    look_for_keys=False,
    timeout=10
)
ssh.close()


-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x2go.org/pipermail/x2go-dev/attachments/20110527/7f5312b4/attachment.pgp>


More information about the x2go-dev mailing list