Can't connect using IPV6 - SSH
This is a discussion on Can't connect using IPV6 - SSH ; 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,
...
-
Can't connect using IPV6
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:192.168.1.1
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:63.205.166.236 [fe80::5efe:c0a8:101]
port 22.
debug1: connect to address fe80::5efe:c0a8:101
ssh: connect to host fe80::5efe:192.168.1.1 port 22: Invalid argument
root@Linux1:~#
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?
Bruce
-
Re: Can't connect using IPV6
On 2006-07-22, Bruce Penrod wrote:
> ssh: connect to host fe80::5efe:192.168.1.1 port 22: Invalid argument
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
newsreading.
connect(3, {sa_family=AF_INET, sin_port=htons(22),
sin_addr=inet_addr("217.155.xxx.yyy")}, 16) = 0
--
Elvis Notargiacomo master AT barefaced DOT cheek
http://www.notatla.org.uk/goen/
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:
fe80::5efe:192.168.1.1%eth0
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.
Bruce
all mail refused wrote:
> On 2006-07-22, Bruce Penrod wrote:
>
>
>>ssh: connect to host fe80::5efe:192.168.1.1 port 22: Invalid argument
>
>
> 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
> newsreading.
>
> connect(3, {sa_family=AF_INET, sin_port=htons(22),
> sin_addr=inet_addr("217.155.xxx.yyy")}, 16) = 0
>