Description of problem: ssh -o ProxyCommand="ncat -v --proxy-type socks5 --proxy <ip>:<port> %h %p" <host> Is not working with nmap-ncat-7.91-8.fc35.x86_64 Example: create a sock5 proxy with ssh ssh -D 4567 <host> Try using the connection with: ssh -o ProxyCommand="ncat -v --proxy-type socks5 --proxy 127.0.0.1:4567 %h %p" myhost The conenction will fail with: kex_exchange_identification: Connection closed by remote host Connection closed by UNKNOWN port 65535 Using OpenBSD netcat will work: ssh -o ProxyCommand="netcat -X 5 -x 127.0.0.1:4080 %h %p" myhost Or using the ncat from the nmap page: rpm -vhU https://nmap.org/dist/ncat-7.92-1.x86_64.rpm So I guess something is broken with the ncat that fedora provides.
Thanks for the report, this is a known issue with 7.91. See https://github.com/nmap/nmap/issues/2149 *** This bug has been marked as a duplicate of bug 2020453 ***