PuTTY配置等同于OpenSSH ProxyCommand [英] PuTTY configuration equivalent to OpenSSH ProxyCommand
问题描述
我只是想使用PuTTY来建立到我服务器的SSH连接. 这些服务器仅允许来自其他特定服务器(以下示例中的"MySshProxyingServer")的传入SSH连接.
I'm just trying to use PuTTY to get an SSH connection to my servers. These servers allow incoming SSH connection only from another specific server ("MySshProxyingServer" in example below).
使用Linux,ssh -W
命令没问题.
Using Linux this is no problem with the ssh -W
command.
在PuTTY中,我找不到创建此类连接的选项.
In PuTTY I can't find the options to create such a connection.
Linux(~/.ssh/config
)下的示例:
Example under Linux (~/.ssh/config
):
Host MyHostToConnectTo
Hostname xx.xx.xx.xx
User root
Identityfile ~/.ssh/id_rsa
ProxyCommand ssh MySshProxyServer -W %h:%p
任何人都知道如何在PuTTY中使用这样的配置吗?
Anyone knows how to use such a config in PuTTY?
推荐答案
PuTTY中的等效项是本地代理命令".您可以将 plink.exe
与 -nc
开关,而不是-W
开关:
The equivalent in PuTTY is "local proxy command". You can use the plink.exe
with the -nc
switch instead of the ssh
with the -W
switch:
本地代理命令" 为:
plink.exe %user@%proxyhost -P %proxyport -nc %host:%port
一种替代方法是,首先使用另一个PuTTY(或Plink)实例通过"MySshProxyServer"打开隧道.
An alternative is to open a tunnel via the "MySshProxyServer" first using another instance of PuTTY (or Plink).
例如参见
- 如何在Windows中使用PuTTY创建SSH隧道?
- 我的指南,用于隧道SFTP/SCP会话.它用于WinSCP,但在通过隧道连接部分中,只需使用PuTTY而不是WinSCP. /li>
- How to create SSH tunnel using PuTTY in Windows?
- My guide for tunneling SFTP/SCP session. It's for WinSCP, but just use PuTTY instead of WinSCP in section Connecting through the tunnel.
这篇关于PuTTY配置等同于OpenSSH ProxyCommand的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!