Proxycommand and ncat not work with dynamic port fwd
Clash Royale CLAN TAG#URR8PPP
up vote
-1
down vote
favorite
Im trying to connect to some devices from a Centos7 server, via a jump machine using dynamic port fwd.
I have this .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 ~]#*
If I do a static port forwarding it works fine.
Any idea?
Rgds / Luis
ssh
add a comment |Â
up vote
-1
down vote
favorite
Im trying to connect to some devices from a Centos7 server, via a jump machine using dynamic port fwd.
I have this .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 ~]#*
If I do a static port forwarding it works fine.
Any idea?
Rgds / Luis
ssh
1
'Could not resolve hostname "hl4man1"'
â Ipor Sircer
Jul 12 at 15:02
add a comment |Â
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
Im trying to connect to some devices from a Centos7 server, via a jump machine using dynamic port fwd.
I have this .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 ~]#*
If I do a static port forwarding it works fine.
Any idea?
Rgds / Luis
ssh
Im trying to connect to some devices from a Centos7 server, via a jump machine using dynamic port fwd.
I have this .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 ~]#*
If I do a static port forwarding it works fine.
Any idea?
Rgds / Luis
ssh
edited Jul 12 at 15:00
Ipor Sircer
8,6181920
8,6181920
asked Jul 12 at 14:58
gimeno_l
1
1
1
'Could not resolve hostname "hl4man1"'
â Ipor Sircer
Jul 12 at 15:02
add a comment |Â
1
'Could not resolve hostname "hl4man1"'
â Ipor Sircer
Jul 12 at 15:02
1
1
'Could not resolve hostname "hl4man1"'
â Ipor Sircer
Jul 12 at 15:02
'Could not resolve hostname "hl4man1"'
â Ipor Sircer
Jul 12 at 15:02
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
You can't proxy to a host which your man-in-the middle can't find.
Ncat: Could not resolve hostname "hl4man1": Name or service not known. QUITTING.
ssh_exchange_identification: Connection closed by remote host
Try connecting to a host that exists insofar as the proxy host can find?
Put another way, you can't ask Bob to get something from Larry's house if Bob doesn't know where Larry lives.
Hi, hl4man1 is known by the jump host. I can ssh user@hl4man1 from the jump host.
â gimeno_l
Jul 12 at 15:15
Is this because the host is defined in thessh
config on the jump host? Becausenc
doesn't read that.
â DopeGhoti
Jul 12 at 15:20
The jump host uses DNS in the remote network to access all the nodes, the name of nodes in which im interested in start with hl*.
â gimeno_l
Jul 12 at 17:18
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
You can't proxy to a host which your man-in-the middle can't find.
Ncat: Could not resolve hostname "hl4man1": Name or service not known. QUITTING.
ssh_exchange_identification: Connection closed by remote host
Try connecting to a host that exists insofar as the proxy host can find?
Put another way, you can't ask Bob to get something from Larry's house if Bob doesn't know where Larry lives.
Hi, hl4man1 is known by the jump host. I can ssh user@hl4man1 from the jump host.
â gimeno_l
Jul 12 at 15:15
Is this because the host is defined in thessh
config on the jump host? Becausenc
doesn't read that.
â DopeGhoti
Jul 12 at 15:20
The jump host uses DNS in the remote network to access all the nodes, the name of nodes in which im interested in start with hl*.
â gimeno_l
Jul 12 at 17:18
add a comment |Â
up vote
0
down vote
You can't proxy to a host which your man-in-the middle can't find.
Ncat: Could not resolve hostname "hl4man1": Name or service not known. QUITTING.
ssh_exchange_identification: Connection closed by remote host
Try connecting to a host that exists insofar as the proxy host can find?
Put another way, you can't ask Bob to get something from Larry's house if Bob doesn't know where Larry lives.
Hi, hl4man1 is known by the jump host. I can ssh user@hl4man1 from the jump host.
â gimeno_l
Jul 12 at 15:15
Is this because the host is defined in thessh
config on the jump host? Becausenc
doesn't read that.
â DopeGhoti
Jul 12 at 15:20
The jump host uses DNS in the remote network to access all the nodes, the name of nodes in which im interested in start with hl*.
â gimeno_l
Jul 12 at 17:18
add a comment |Â
up vote
0
down vote
up vote
0
down vote
You can't proxy to a host which your man-in-the middle can't find.
Ncat: Could not resolve hostname "hl4man1": Name or service not known. QUITTING.
ssh_exchange_identification: Connection closed by remote host
Try connecting to a host that exists insofar as the proxy host can find?
Put another way, you can't ask Bob to get something from Larry's house if Bob doesn't know where Larry lives.
You can't proxy to a host which your man-in-the middle can't find.
Ncat: Could not resolve hostname "hl4man1": Name or service not known. QUITTING.
ssh_exchange_identification: Connection closed by remote host
Try connecting to a host that exists insofar as the proxy host can find?
Put another way, you can't ask Bob to get something from Larry's house if Bob doesn't know where Larry lives.
answered Jul 12 at 15:04
DopeGhoti
39.7k54679
39.7k54679
Hi, hl4man1 is known by the jump host. I can ssh user@hl4man1 from the jump host.
â gimeno_l
Jul 12 at 15:15
Is this because the host is defined in thessh
config on the jump host? Becausenc
doesn't read that.
â DopeGhoti
Jul 12 at 15:20
The jump host uses DNS in the remote network to access all the nodes, the name of nodes in which im interested in start with hl*.
â gimeno_l
Jul 12 at 17:18
add a comment |Â
Hi, hl4man1 is known by the jump host. I can ssh user@hl4man1 from the jump host.
â gimeno_l
Jul 12 at 15:15
Is this because the host is defined in thessh
config on the jump host? Becausenc
doesn't read that.
â DopeGhoti
Jul 12 at 15:20
The jump host uses DNS in the remote network to access all the nodes, the name of nodes in which im interested in start with hl*.
â gimeno_l
Jul 12 at 17:18
Hi, hl4man1 is known by the jump host. I can ssh user@hl4man1 from the jump host.
â gimeno_l
Jul 12 at 15:15
Hi, hl4man1 is known by the jump host. I can ssh user@hl4man1 from the jump host.
â gimeno_l
Jul 12 at 15:15
Is this because the host is defined in the
ssh
config on the jump host? Because nc
doesn't read that.â DopeGhoti
Jul 12 at 15:20
Is this because the host is defined in the
ssh
config on the jump host? Because nc
doesn't read that.â DopeGhoti
Jul 12 at 15:20
The jump host uses DNS in the remote network to access all the nodes, the name of nodes in which im interested in start with hl*.
â gimeno_l
Jul 12 at 17:18
The jump host uses DNS in the remote network to access all the nodes, the name of nodes in which im interested in start with hl*.
â gimeno_l
Jul 12 at 17:18
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f454919%2fproxycommand-and-ncat-not-work-with-dynamic-port-fwd%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
'Could not resolve hostname "hl4man1"'
â Ipor Sircer
Jul 12 at 15:02