RHEL9: ssh'ing through a proxy fails with "kex_exchange_identification: Connection closed by remote host"
Issue
-
When configuring ssh with a proxy (HTTP, SOCKS, ...), the ssh session fails immediately before authentication, as shown in the example below
$ ssh -o ProxyCommand="nc --proxy <proxy:8080> --proxy-type http %h %p" <user>@<remote-system> true kex_exchange_identification: Connection closed by remote host Connection closed by UNKNOWN port 65535
Environment
- Red Hat Enterprise Linux 9
- nmap-ncat
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.