我想要的是通过跳转主机(下面的serverA)ssh到IPv6服务器(下面的serverB)
issue: ssh -J :
- ssh -v -J prod60:45719 user@fe80::xxx:xxff:fexx:8718%eth0
简单的结构如下:
serverA/jumper:port serverB
本地机器 ------> prod60:45719 ------> fe80::xxx:xxff:fexx:8718%eth0
Facts:
1. Both serverA and serverB are with ipv4 and ipv6 configured in general and they are under same subset and thus reachable to each other
2. ssh prod60 -p 45719 // this works fine...the jumper is reachable
3. ssh -J prod60:45719 user@<ipv4_of_serverB> // this works fine...jumper works fine to ipv4_address of serverB
- ssh -vvv -J prod60:45719 [email protected]
4. on serverA, ssh user@<ipv6_of_serverB>%eth0 // this works fine...jumper and dst are reachable
- ssh -vvv user@fe80::xxx:xxff:fexx:8718%eth0
虽然有时 serverB 的 ipv4 不可用,但我希望通过 serverA 代理跳转到 ipv6_serverB 作为中间的跳转......这就是问题所在。
补充: 我试过 ssh -v 并比较了 fact4 场景和问题场景的细节,它显示:
- fact4 scenario (ssh ipv6_serverB from serverA):
-- Authenticated to fe80::xxx:xxff:fexx:8718%eth0 ([fe80::xxx:xxff:fexx:8718%eth0]:22).
debug1: channel 0: new [client-session]
- issue scenario (ssh -J jumper:port user@<ipv6_serverB>%eth0):
-- debug1: channel_connect_stdio_fwd: fe80::xxx:xxff:fexx:8718:22
debug1: channel 0: new [stdio-forward]
debug1: getpeername failed: Bad file descriptor
很明显有一个 %eth0 的区别,在成功的 fact4 场景中,%eth0 被结转并处理,而在坏问题场景中,%eth0 被忽略,原因不明,后来 getpeername 失败。
我被困在这里,不知道如何进一步排除故障或修复它。 任何人都可以在这里帮忙并详细说明一下吗?谢谢!
会期待某事。像下面的场景可以工作:
ssh -J :