Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm able to ping my Ubuntu box via command: (where c2h2ttt is listed in /etc/hosts)

c2h2@c2h2crawler:~/ttt$ ping6 -I eth1 c2h2ttt
PING c2h2ttt(c2h2ttt) from fe80::21b:21ff:fe22:e865 eth1: 56 data bytes
64 bytes from c2h2ttt: icmp_seq=1 ttl=64 time=10.3 ms
64 bytes from c2h2ttt: icmp_seq=2 ttl=64 time=2.06 ms
64 bytes from c2h2ttt: icmp_seq=3 ttl=64 time=1.33 ms

And when I try ssh -6 c2h2ttt it shows:

c2h2@c2h2crawler:~/ttt$ ssh -6 c2h2ttt
ssh: connect to host c2h2ttt port 22: Invalid argument

What's the correct command?


On the server side /etc/ssh/sshd_config has:

ListenAddress ::
ListenAddress 0.0.0.0

I was able to ssh to c2h2ttt via ipv4 on port 22. and netstat -lnt | grep :22 is

root@c2h2think:~# netstat -lnt | grep :22
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
tcp6       0      0 :::22                   :::*                    LISTEN

ufw is used and its allowing any inbound traffic on port 22

root@c2h2think:~# ufw status
Status: active

To                         Action      From
--                         ------      ----
22                         ALLOW       Anywhere

And the iptables configuration:

root@c2h2think:~# ip6tables -L -v -n
Chain INPUT (policy DROP 55 packets, 10758 bytes)
pkts bytes target     prot opt in     out     source               destination 
    0     0 ACCEPT     all      lo     *       ::/0                 ::/0        

Chain FORWARD (policy DROP 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination 

Chain OUTPUT (policy DROP 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination 
    0     0 ACCEPT     all      *      lo      ::/0                 ::/0  
share|improve this question
    
You might need to edit your sshd.conf file and/or restart sshd so it realizes there are new v6 addresses to listen on. –  lepe Jan 24 '11 at 4:49
    
Check what netstat -lnt | grep :22 (open listening numeric tcp sockets | containing :22) says. –  ephemient Jan 24 '11 at 5:22
    
You did open port 22 with ip6tables... right? –  Ignacio Vazquez-Abrams Jan 24 '11 at 5:42
    
One second i check ip6tables –  c2h2 Jan 24 '11 at 5:48
add comment

migrated from stackoverflow.com Jan 24 '11 at 5:35

This question came from our site for professional and enthusiast programmers.

2 Answers

up vote 18 down vote accepted

Try specifying the interface to the ssh client. The ping6 utility allows you to specify an interface, however ssh does not have a switch for that, you have to use this syntax:

ssh -6 fe80::21b:21ff:fe22:e865%eth1
share|improve this answer
1  
wow, it works thanks! just because the eth1 problem –  c2h2 Jan 24 '11 at 7:24
    
@c2h2 you are more than welcome :) –  John T Jan 24 '11 at 21:51
add comment

Link local addresses aren't supposed to be used for SSH, they're for low-level protocol bootstrapping stuff. If you don't have an ISP-provided prefix to use on your network, then generate a unique-local prefix from fd00::/8 instead:

http://en.wikipedia.org/wiki/Unique_local_address

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.