尝试创建一个socks (-D) ssh 隧道 - Linux 盒到 Linux 盒(都是 centos):
sshd 在远程端运行正常。
从本地机器我们做/看到这个:
ssh -D 1080 user@8.8.8.8.
user@8.8.8.8's password:
bind: Cannot assign requested address
Run Code Online (Sandbox Code Playgroud)
(其中 8.8.8.8 实际上是我服务器的 IP,'user' 是我的真实用户名)
我在这个终端窗口中登录到远程端。我可以验证本地端口在此命令之前未被使用,然后在命令之后被 ssh 进程使用,通过:
netstat -lnp | grep 1080
Run Code Online (Sandbox Code Playgroud)
因此,与大多数带有此错误的 googled 响应不同,问题似乎不是环回接口分配。如果我尝试将此隧道与邮件客户端一起使用,本地端会允许尝试(没有“代理失败”错误),但不会返回任何数据/回复。
在远程端,我的 sshd_config 中确实有“PermitTunnel yes”(尽管“yes”应该是默认值,无论如何)。
想法或线索?
这是相关的调试输出
OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
....
debug1: Authentication succeeded (password).
debug1: Local connections to LOCALHOST:1080 forwarded to remote address socks:0
debug1: Local forwarding …
Run Code Online (Sandbox Code Playgroud)