Unix Technical Forum

help with ipv6 and ssh in slackware

This is a discussion on help with ipv6 and ssh in slackware within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> I am running slack9.1 on two linux boxes and I was able to use ping6 to ping one from ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-19-2008, 04:49 PM
Chris Marshall
 
Posts: n/a
Default help with ipv6 and ssh in slackware

I am running slack9.1 on two linux boxes and I was able to use ping6
to ping one from the other across an ethernet LAN successfully.

I was also able to "ssh -6 -l user ::1" on each box to the sshd
running on the same box, but I can't ssh -6 from one box to the other.

The ssh command report the error "invalid argument"

When I run the ssh command under strace to see which system call is
failing, it turns out to be a call to connect(). It seems that some
glibc routines refuse to parse inet6 addresses?

On each box, I ran these commands:

insmod ipv6
/etc/rc.d/rc.sshd restart
ifconfig eth0

The last was to get the automatically assigned ipv6 link address on
each machine.

Any ideas what I am doing wrong?

Chris Marshall
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-19-2008, 04:51 PM
Daniel de Kok
 
Posts: n/a
Default Re: help with ipv6 and ssh in slackware

On Fri, 22 Oct 2004 11:32:55 -0700, Chris Marshall wrote:
> I am running slack9.1 on two linux boxes and I was able to use ping6
> to ping one from the other across an ethernet LAN successfully.
>
> I was also able to "ssh -6 -l user ::1" on each box to the sshd
> running on the same box, but I can't ssh -6 from one box to the other.
>
> The ssh command report the error "invalid argument"
>
> When I run the ssh command under strace to see which system call is
> failing, it turns out to be a call to connect(). It seems that some
> glibc routines refuse to parse inet6 addresses?
>
> On each box, I ran these commands:
>
> insmod ipv6
> /etc/rc.d/rc.sshd restart
> ifconfig eth0
>
> The last was to get the automatically assigned ipv6 link address on
> each machine.


It probably only got a fe80:: (link-local) address. fe80:: are not
routable, and you probably have to specify the scope (in this case the
interface name) to get it working. So, fe80:<fill in>%eth0. But generally
speaking it is a very good idea to assign at least a site-local address to
the interface (site-local functions comparable to 192.168.0.0/255.255.0.0
in IPv4). Site-local addresses start with fec0::. An example of how to set
this up can be found in :

http://www.linuxpackages.net/howto/s...netconfig.html

It will probably work without a hassle if both interfaces have a
site-local address.

-- Daniel
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-19-2008, 04:58 PM
Chris Marshall
 
Posts: n/a
Default Re: help with ipv6 and ssh in slackware

Daniel de Kok <daniel@nowhere.nospam> wrote in message news:<pan.2004.10.24.08.35.30.472819@nowhere.nospa m>...
> It probably only got a fe80:: (link-local) address. fe80:: are not
> routable, and you probably have to specify the scope (in this case the
> interface name) to get it working. So, fe80:<fill in>%eth0. But generally
> speaking it is a very good idea to assign at least a site-local address to
> the interface (site-local functions comparable to 192.168.0.0/255.255.0.0
> in IPv4). Site-local addresses start with fec0::. An example of how to set
> this up can be found in :
>
> http://www.linuxpackages.net/howto/s...netconfig.html
>
> It will probably work without a hassle if both interfaces have a
> site-local address.
>
> -- Daniel


Daniel:

Thanks! That was indeed the problem. I didn't realize link local
addresses were not routable. I assigned global addresses, and then I
was able to ssh from one box to the other.

I wrote some notes to myself showing the commands I used to get this
working. For the benefit of future USENET searchers, I have appended
it below.

Chris Marshall

# some commands

# load the kernel module
insmod ipv6

# show ipv6 routes
route -A inet6

# ping a link local address residing somewhere on the LAN eth0 is
connected to
# this works from one machine to another!
ping6 -I eth0 fe80::2e0:81ff:fe10:38cd

# restart sshd with ipv6 support (meaning you restart it after the
kernel module is loaded),
# then connect to ssh using ipv6.
# this also works!
/etc/rc.d/rc.sshd restart
ssh -6 -l user ::1

# this is what doesn't work.
ssh -6 -l user fe80::2e0:81ff:fe10:38cd
# from searching the internet, I gather one problem may be that fe80
is a link local address and,
# as such, you have to specify an interface to use with it.
# ssh may not let you specify an interface.
# so, perhaps, if you could create a global address, and put a route
for it in your routing
# table, you could ssh from one machine to another.

# Ah HA!
# This lets me connect from one machine to another.
# on A:
ifconfig eth0 inet6 add 3ffe::1/64
# on B:
ifconfig eth0 inet6 add 3ffe::2/64
# on A:
ssh -6 -l user 3ffe::2
# that's because to use tcp or udp from one machine to another
requires global addresses.
# link local addresses are only for machines to discover routes, I
guess.
# I can't believe I got this working!!!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:15 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com