我在 192.168.1.8 上启动 sshd,命令如下:
sudo /usr/sbin/sshd -ddd
然后我尝试打开到 192.168.1.5:1234 的 SSH 隧道,但无法打开。内容如下sshd -ddd
:
debug1: server_input_channel_open: confirm direct-tcpip
debug3: channel 1: waiting for connection
debug1: channel 1: connected to 192.168.1.5 port 1234
debug2: channel 1: read<=0 rd 10 len 0
debug2: channel 1: read failed
debug2: channel 1: close_read
debug2: channel 1: input open -> drain
debug2: channel 1: ibuf empty
debug2: channel 1: send eof
debug2: channel 1: input drain -> closed
debug2: channel 1: rcvd close
debug2: channel 1: output open -> drain
debug3: channel 1: will not send data after close
debug2: channel 1: obuf empty
debug2: channel 1: close_write
debug2: channel 1: output drain -> closed
debug2: channel 1: send close
debug2: channel 1: is dead
debug2: channel 1: garbage collecting
debug1: channel 1: free: direct-tcpip, nchannels 2
debug3: channel 1: status: The following connections are open:
#0 server-session (t4 r256 i0/0 o0/0 fd 11/9 cc -1)
#1 direct-tcpip (t4 r257 i3/0 o3/0 fd 10/10 cc -1)
因此它能够连接但读取失败。然而,当我在 192.168.1.8 上执行此操作时,我能够连接(没有读取失败):
ssh -p 1234 [email protected]
那么,为什么 192.168.1.8 上的直接 ssh 连接没有失败,而 192.168.1.8 上的隧道却失败了呢?
我正在使用 PuTTY 创建隧道。