如何允许通过 PPP 进行 SSH?

如何允许通过 PPP 进行 SSH?

我通过 ppp 连接了这两台计算机。

一个有 ip 10.10.0.1,另一个有 ip 10.10.0.2

ppp0两者都有带有网络掩码的接口255.255.255.255

# ifconfig
ppp0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1500
        inet 10.10.0.2  netmask 255.255.255.255  destination 10.10.0.1
        ppp  txqueuelen 3  (Point-to-Point Protocol)
        RX packets 7  bytes 105 (105.0 B)
        RX errors 3  dropped 0  overruns 0  frame 0
        TX packets 20  bytes 1522 (1.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

如何才能使用 SSH10.10.0.2进行连接?10.10.0.1

如果我做:

# ssh -vv [email protected]

我可以看到它被冻结在:

.
.
.
password: 
debug2: input_userauth_info_req
debug2: input_userauth_info_req: num_prompts 0
debug1: Authentication succeeded (keyboard-interactive).
Authenticated to 10.10.0.1 ([10.10.0.1]:22).
debug1: channel 0: new [client-session]
debug2: channel 0: send open
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug1: pledge: network

从 tcpdump 观看所有内容,我看到:

# tcpdump -i ppp0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ppp0, link-type LINUX_SLL (Linux cooked), capture size 262144 bytes
22:15:48.592651 IP tlcmelo > 10.100.0.1: ICMP echo request, id 17288, seq 1, length 64
22:15:48.942907 IP 10.100.0.1 > tlcmelo: ICMP echo reply, id 17288, seq 1, length 64
22:15:49.593728 IP tlcmelo > 10.100.0.1: ICMP echo request, id 17288, seq 2, length 64
22:15:49.821594 IP 10.100.0.1 > tlcmelo: ICMP echo reply, id 17288, seq 2, length 64
22:15:50.595483 IP tlcmelo > 10.100.0.1: ICMP echo request, id 17288, seq 3, length 64
22:15:50.840112 IP 10.100.0.1 > tlcmelo: ICMP echo reply, id 17288, seq 3, length 64
22:15:51.597014 IP tlcmelo > 10.100.0.1: ICMP echo request, id 17288, seq 4, length 64
22:16:00.105020 IP tlcmelo.57621 > 10.100.0.1.57621: UDP, length 44
22:16:38.104153 IP tlcmelo.57621 > 10.100.0.1.57621: UDP, length 44
22:17:04.490191 IP tlcmelo.37489 > 239.255.255.250.1900: UDP, length 171
22:17:05.490773 IP tlcmelo.37489 > 239.255.255.250.1900: UDP, length 171
22:17:06.491775 IP tlcmelo.37489 > 239.255.255.250.1900: UDP, length 171
22:17:07.492280 IP tlcmelo.37489 > 239.255.255.250.1900: UDP, length 171
22:17:16.104112 IP tlcmelo.57621 > 10.100.0.1.57621: UDP, length 44
22:17:54.103994 IP tlcmelo.57621 > 10.100.0.1.57621: UDP, length 44
22:18:32.105034 IP tlcmelo.57621 > 10.100.0.1.57621: UDP, length 44

编辑1:

@derobert,感谢您的消息:实际上也不可能从10.10.0.1back ssh 到10.10.0.2,同样的问题。我尝试了较小的 MTU,不幸的是没有成功。

@pizdelect,感谢您的留言:我在两台计算机上都运行 debian。我尝试将 MTU 设置为 1000 和 500,但尚未成功。

编辑2:

在 中10.10.0.1iptables -vL我看到了这些:

Chain Block (2 references)
 pkts bytes target     prot opt in     out     source               destination         
   75  3210 LOG        all  --  any    any     anywhere            !0.0.0.255/-1         limit: avg 3/hour burst 5 LOG level warning prefix "Iptables: Block: "
    6   360 REJECT     tcp  --  any    any     anywhere             anywhere             reject-with tcp-reset
 2433  143K REJECT     udp  --  any    any     anywhere             anywhere             reject-with icmp-port-unreachable
    0     0 DROP       all  --  any    any     anywhere             anywhere 

是否有可能它阻止了连接?

相关内容