macos - OSX SSH 通过 SOCKS5 代理服务器

标签 macos ssh proxy socks

我正在尝试通过 SOCKS5 代理连接到服务器。我试过使用 -o 并编辑我的 ~/.ssh/config 文件但无济于事。

这是我尝试过的 SSH 命令:

ssh -v -o 'ProxyCommand=nc -X 5 -x proxyhost:1080 %h %p' -p22 username@serverhost

问题似乎是我的代理主机需要用户名和密码,我看不到如何在 ProxyCommand 中传递用户/密码。

最佳答案

您需要将用户名和密码传递给 nc 命令,他正在做您的代理。关于它的所有内容都写在 ncat(1) 的手册页中:

--proxy-auth user[:pass] (Specify proxy credentials) .

In connect mode, gives the credentials that will be used to connect to the proxy server. In listen mode, gives the credentials that will be required of connecting clients. For use with --proxy-type http, the form should be user:pass. For --proxy-type socks4, it should be a username only.

关于macos - OSX SSH 通过 SOCKS5 代理服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34348720/

相关文章:

ios - 如何在 OSX 应用程序中使用核心蓝牙?

go - 如何在 golang 中传递 http 请求?

ssh - 通过socks代理的DNS。如何更改域解析的 Windows 设置。

python - 在 Mac 上自动播放视频

macos - Qt 应用程序显示表情符号而不是 unicode 字符

docker - 从容器 ssh 到远程主机,无需 openssh-client 设置

javascript - 通过 Node.js 传输命令的输入和输出

ssh - StrictHostKeyChecking 不忽略指纹验证

laravel - 如何在 Laravel 7 中的 Http 请求中设置代理?

java - Java 编译器与 Linux/Windows 上的编译器相同吗?