对于ipv6地址,ssh-keyscan失败

时间:2014-03-26 22:45:09

标签: ssh ipv6

我无法使用ssh-keyscan来处理ipv6地址。有人能帮助我吗?

$ ssh-keyscan -6v -t rsa FE80:0000:021B:21FF:FEDA:62AD
getaddrinfo FE80:0000:021B:21FF:FEDA:62AD: Name or service not known

$ ssh-keyscan -6v -t rsa [FE80:0000:021B:21FF:FEDA:62AD]
getaddrinfo [FE80:0000:021B:21FF:FEDA:62AD]: Name or service not known

但这有效:

$ ping6 -I bond0  fe80::21b:21ff:feda:62ad
PING fe80::21b:21ff:feda:62ad(fe80::21b:21ff:feda:62ad) from fe80::21b:21ff:feda:64a9 bond0: 56 data bytes
64 bytes from fe80::21b:21ff:feda:62ad: icmp_seq=1 ttl=64 time=0.571 ms
64 bytes from fe80::21b:21ff:feda:62ad: icmp_seq=2 ttl=64 time=0.165 ms
64 bytes from fe80::21b:21ff:feda:62ad: icmp_seq=3 ttl=64 time=0.145 ms
^C
--- fe80::21b:21ff:feda:62ad ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2206ms
rtt min/avg/max/mdev = 0.145/0.293/0.571/0.197 ms

1 个答案:

答案 0 :(得分:1)

您指定了链接本地IPv6地址,但忘记了范围。将范围ID添加到其中。

你也错过了你最初提供的地址中的一些八位字节。

纠正这两个问题:

ssh-keyscan -6v -t rsa FE80::021B:21FF:FEDA:62AD%bond0