Bug 2044364

Summary: ssh and ncat proxy seems broken
Product: [Fedora] Fedora Reporter: Michael Kalisz <michael.kalisz>
Component: nmapAssignee: Martin Osvald 🛹 <mosvald>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 35CC: markmc, mhlavink, mosvald, pavel
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-02-22 15:33:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michael Kalisz 2022-01-24 13:25:25 UTC
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.

Comment 1 Mark McLoughlin 2022-02-22 15:33:29 UTC
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 ***