c2h*_*2h2 73 ssh ping ipv6 ubuntu
我可以通过命令 ping 我的 Ubuntu 框:(其中 c2h2ttt 列在 /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
Run Code Online (Sandbox Code Playgroud)
当我尝试时,ssh -6 c2h2ttt
它显示:
c2h2@c2h2crawler:~/ttt$ ssh -6 c2h2ttt
ssh: connect to host c2h2ttt port 22: Invalid argument
Run Code Online (Sandbox Code Playgroud)
正确的命令是什么?
在服务器端 /etc/ssh/sshd_config 有:
ListenAddress ::
ListenAddress 0.0.0.0
Run Code Online (Sandbox Code Playgroud)
我能够通过端口 22 上的 ipv4 ssh 到 c2h2ttt。并且netstat -lnt | grep :22
是
root@c2h2think:~# netstat -lnt | grep :22
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp6 0 0 :::22 :::* LISTEN
Run Code Online (Sandbox Code Playgroud)
使用 ufw 并允许端口 22 上的任何入站流量
root@c2h2think:~# ufw status
Status: active
To Action From
-- ------ ----
22 ALLOW Anywhere
Run Code Online (Sandbox Code Playgroud)
以及 iptables 配置:
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
Run Code Online (Sandbox Code Playgroud)
Joh*_*n T 111
尝试指定 ssh 客户端的接口。ping6 实用程序允许您指定一个接口,但是 ssh 没有用于此的开关,您必须使用以下语法:
ssh -6 fe80::21b:21ff:fe22:e865%eth1
小智 10
链接本地地址不应该用于 SSH,它们用于低级协议引导程序。如果您的网络上没有 ISP 提供的前缀,请从 fd00::/8 生成唯一的本地前缀:
http://en.wikipedia.org/wiki/Unique_local_address
归档时间: |
|
查看次数: |
176555 次 |
最近记录: |