【发布时间】:2015-11-22 11:04:51
【问题描述】:
我正在尝试在 Windows 7 上运行 ssh SOCKS 服务器(侦听端口 12345)。 这是我在 Cygwin 上得到的输出:
$ ssh -v -D 12345 localhost
OpenSSH_6.8p1, OpenSSL 1.0.2c 12 Jun 2015
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to localhost [::1] port 22.
debug1: connect to address ::1 port 22: Connection refused
debug1: Connecting to localhost [127.0.0.1] port 22.
debug1: connect to address 127.0.0.1 port 22: Connection refused
ssh: connect to host localhost port 22: Connection refused
为什么要尝试连接到 localhost:22? 看起来它正在尝试访问在 localhost 上运行的 sshd。 我认为 ssh 客户端足以设置本地 SOCKS 服务器。如果不是,为什么我需要运行 sshd?
来自https://help.ubuntu.com/community/SSH/OpenSSH/PortForwarding:
“动态端口转发将您的 SSH 客户端变成 SOCKS 代理服务器”
【问题讨论】: