PuTTY 配置相当于 OpenSSH ProxyCommand [英] PuTTY configuration equivalent to OpenSSH ProxyCommand

查看:39
本文介绍了PuTTY 配置相当于 OpenSSH ProxyCommand的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是想使用 PuTTY 与我的服务器建立 SSH 连接.这些服务器仅允许来自另一个特定服务器(以下示例中的MySshProxyingServer")的传入 SSH 连接.

在 Linux 上使用 ssh -W 命令没有问题.

在 PuTTY 中,我找不到创建此类连接的选项.

Linux 下的例子(~/.ssh/config):

Host MyHostToConnectTo主机名 xx.xx.xx.xx用户根身份文件 ~/.ssh/id_rsaProxyCommand ssh MySshProxyServer -W %h:%p

有人知道如何在 PuTTY 中使用这样的配置吗?

解决方案

PuTTY 中的等价物是本地代理命令".您可以使用

本地代理命令"是:

plink.exe %user@%proxyhost -P %proxyport -nc %host:%port

<小时>

另一种方法是首先使用 PuTTY(或 Plink)的另一个实例通过MySshProxyServer"打开隧道.

参见示例:

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).

Using Linux this is no problem with the ssh -W command.

In PuTTY I can't find the options to create such a connection.

Example under Linux (~/.ssh/config):

Host MyHostToConnectTo
    Hostname xx.xx.xx.xx
    User root
    Identityfile ~/.ssh/id_rsa
    ProxyCommand ssh MySshProxyServer -W %h:%p

Anyone knows how to use such a config in PuTTY?

解决方案

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:

The "local proxy command" is:

plink.exe %user@%proxyhost -P %proxyport -nc %host:%port


An alternative is to open a tunnel via the "MySshProxyServer" first using another instance of PuTTY (or Plink).

See for example:

这篇关于PuTTY 配置相当于 OpenSSH ProxyCommand的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆