Can't connect using IPV6

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I've been using OpenSSH for years, so I understand the simple stuff.
I'm setting up IPV6 on a small network now and can't seem to get it to
work.  I have two machines with linux 2.4.31 kernels compiled for IPV6,
and everything works properly using their IPV4 addresses.  Both machines
have a link local IPV6 address set up on the same ethernet device that
is also set up with an IPV4 address, and I can ping6 back and forth
between the two.

When I try to connect from one to the other using ssh, all I get is:

root@Linux1:~# ssh -vvv -6 fe80::5efe:
OpenSSH_4.2p1, OpenSSL 0.9.7g 11 Apr 2005
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to fe80::5efe: [fe80::5efe:c0a8:101]
port 22.
debug1: connect to address fe80::5efe:c0a8:101
ssh: connect to host fe80::5efe: port 22: Invalid argument

I've tried various different types of IPV6 addresses, including the
automatically configured one.  I've also tried using the -b switch to
bind ssh to its ipv6 address.  In that case, I get an additional debug
message complaining about an invalid argument in the bind execution.

Is this happening because I have ipv4 configured on the ethernet device
at the same time?

Any ideas?


Re: Can't connect using IPV6

Quoted text here. Click to load it

If you run it under strace will it tell you what arguments were used and
so give you a further clue?

This is a line from strace output using IPv4 and broken for convenient

connect(3, {sa_family=AF_INET, sin_port=htons(22),
    sin_addr=inet_addr("")}, 16) = 0

Elvis Notargiacomo  master AT barefaced DOT cheek /
    One of my other 11 computers runs Minix.

Re: Can't connect using IPV6

Thanks for that.  I was able to see that the connect() call didn't like
the address argument.  After a little more ipv6 research, I discovered
that the link scope ipv6 addresses must have a link specified, i.e. the
interface/device.  This means that such addresses must be done like this:


Some commands, like ping6 have an argument to allow specifying the
device separately, but ssh does not.  If I had set up global scope
addresses this wouldn't have happened and I would have missed the
opportunity to learn this.


all mail refused wrote:
Quoted text here. Click to load it

Site Timeline