ssh无法连接到离奇问题解决方法
ssh无法连接到离奇问题解决方法,一直ssh连接都很正常的,后来在服务器设置了防火墙
之后就一直间隔性无法连接远程的ssh服务器,起初因为是防火墙的问题,一直在解决查找问题
ssh debug显示信息如下
ssh -vv -i /home/coco/文档/ssssproxy-all-nodekey root@2001:4860:4860::8888
debug1: OpenSSH_10.2p1, OpenSSL 3.6.1 27 Jan 2026
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Reading configuration data /etc/ssh/ssh_config.d/20-systemd-ssh-proxy.conf
debug1: Reading configuration data /etc/ssh/ssh_config.d/30-libvirt-ssh-proxy.conf
debug2: resolve_canonicalize: hostname 2001:4860:4860::8888 is address
debug1: Connecting to 2001:4860:4860::8888 [2001:4860:4860::8888] port 22.
debug1: Connection established.
debug1: loaded pubkey from /home/coco/\346\226\207\346\241\243/ssssproxy-all-nodekey: ED25519 SHA256:QKl1/slFYyj2kLDzXym/ouk5cmJuYM5ma2xRty0fkvE
debug1: identity file /home/coco/\346\226\207\346\241\243/ssssproxy-all-nodekey type 2
debug1: no identity pubkey loaded from /home/coco/\346\226\207\346\241\243/ssssproxy-all-nodekey
debug1: Local version string SSH-2.0-OpenSSH_10.2
kex_exchange_identification: Connection closed by remote host
Connection closed by 2001:4860:4860::8888 port 22
后来才想起来开着科学上网工具,有些节点是没有ipv6地址的,问题是远程是ipv6连接远程服务器的,
真的是白白瞎折腾这么久的时间,直接把目标服务器ipv6添加到直连名单即可,前提是我本地也有ipv6地址