Proxycommand と ncat は動的ポート転送では機能しません。

Proxycommand と ncat は動的ポート転送では機能しません。

ジャンプマシンを介してCentos7サーバーの一部のデバイスに接続するために動的ポート転送を使用しようとしています。

この.ssh/configがあります。

*Host jump
        TCPKeepAlive yes
        ServerAliveInterval 1200
        HostName x.x.x.x
        DynamicForward 1080
Host hl*
        ProxyCommand nc -x 127.0.0.1:1080 %h %p*

Then I set up the dynamic port fwd in the jump machine:

*[root@host ~]#ssh -fN user@jump* 

Then when i try the ssh to the final device I get this error:

*[root@host ~]#ssh user@hl4man1 -vv
OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017
debug1: Reading configuration data /root/.ssh/config
debug1: /root/.ssh/config line 10: Applying options for hl*
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 58: Applying options for *
debug1: Executing proxy command: exec nc -x 127.0.0.1:1080 hl4man1 22
debug1: permanently_set_uid: 0/0
debug1: permanently_drop_suid: 0
debug1: identity file /root/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.4
**Ncat: Could not resolve hostname "hl4man1": Name or service not known. QUITTING.
ssh_exchange_identification: Connection closed by remote host**
[root@host ~]#*

静的ポート転送を行うとうまく機能します。

どんなアイデアがありますか?

ルイス/Rgds

ベストアンサー1

ブローカーが見つからないホストにはプロキシを使用できません。

Ncat: Could not resolve hostname "hl4man1": Name or service not known. QUITTING.
ssh_exchange_identification: Connection closed by remote host

プロキシホストが見つかる範囲内に存在するホストに接続しますか?

言い換えれば、ボブがラリーが住んでいる場所がわからない場合は、ボブにラリーの家から物を取るように頼むことはできません。

おすすめ記事