OS Manuals

/usr/bin/ncat

network discovery and security auditing tool

From nmap 7.993-r1 (extra-packages), captured 2026-11-05 by running ncat --help (exit 0). permalink

Ncat 7.993 ( https://nmap.org/ncat )
Usage: ncat [options] [hostname] [port]

Options taking a time assume seconds. Append 'ms' for milliseconds,
's' for seconds, 'm' for minutes, or 'h' for hours (e.g. 500ms).
  -4                         Use IPv4 only
  -6                         Use IPv6 only
  -U, --unixsock             Use Unix domain sockets only
      --vsock                Use vsock sockets only
  -C, --crlf                 Use CRLF for EOL sequence
  -c, --sh-exec <command>    Executes the given command via /bin/sh
  -e, --exec <command>       Executes the given command
      --lua-exec <filename>  Executes the given Lua script
  -g hop1[,hop2,...]         Loose source routing hop points (8 max)
  -G <n>                     Loose source routing hop pointer (4, 8, 12, ...)
  -m, --max-conns <n>        Maximum <n> simultaneous connections
  -h, --help                 Display this help screen
  -d, --delay <time>         Wait between read/writes
  -o, --output <filename>    Dump session data to a file
  -x, --hex-dump <filename>  Dump session data as hex to a file
  -i, --idle-timeout <time>  Idle read/write timeout
  -p, --source-port port     Specify source port to use
  -s, --source addr          Specify source address to use (doesn't affect -l)
  -l, --listen               Bind and listen for incoming connections
  -k, --keep-open            Accept multiple connections in listen mode
  -n, --nodns                Do not resolve hostnames via DNS
  -t, --telnet               Answer Telnet negotiations
  -u, --udp                  Use UDP instead of default TCP
      --sctp                 Use SCTP instead of default TCP
  -v, --verbose              Set verbosity level (can be used several times)
  -w, --wait <time>          Connect timeout
  -z                         Zero-I/O mode, report connection status only
      --append-output        Append rather than clobber specified output files
      --send-only            Only send data, ignoring received; quit on EOF
      --recv-only            Only receive data, never send anything
      --no-shutdown          Continue half-duplex when receiving EOF on stdin
  -q <time>                  After EOF on stdin, wait <time> then quit.
      --allow                Allow only given hosts to connect to Ncat
      --allowfile            A file of hosts allowed to connect to Ncat
      --deny                 Deny given hosts from connecting to Ncat
      --denyfile             A file of hosts denied from connecting to Ncat
      --broker               Enable Ncat's connection brokering mode
      --chat                 Start a simple Ncat chat server
      --proxy <addr[:port]>  Specify address of host to proxy through
      --proxy-type <type>    Specify proxy type ("http", "socks4", "socks5")
      --proxy-auth <auth>    Authenticate with HTTP or SOCKS proxy server
      --proxy-dns <type>     Specify where to resolve proxy destination
      --ssl                  Connect or listen with SSL
      --ssl-cert             Specify SSL certificate file (PEM) for listening
      --ssl-key              Specify SSL private key (PEM) for listening
      --ssl-verify           Verify trust and domain name of certificates
      --ssl-trustfile        PEM file containing trusted SSL certificates
      --ssl-ciphers          Cipherlist containing SSL ciphers to use
      --ssl-servername       Request distinct server name (SNI)
      --ssl-alpn             ALPN protocol list to use
      --version              Display Ncat's version information and exit

See the ncat(1) manpage for full options, descriptions and usage examples
Options (51)
OptionDescriptionSource
-4 (IPv4Force the use of IPv4 only.help + man
-6 (IPv6Force the use of IPv6 only.help + man
-U, --unixsock (UseUse Unix domain sockets rather than network sockets.help + man
--vsock (UseUse AF_VSOCK sockets rather than the default TCP sockets (Linux only).help + man
-C, --crlf (UseThis option tells Ncat to convert LF line endings to CRLF when taking input from standard input.help + man
-c, --sh-exec commandSame as -e, except it tries to execute the command via /bin/sh.help + man
-e, --exec commandExecute the specified command after a connection has been established.help + man
--lua-exec filenameRuns the specified file as a Lua script after a connection has been established, using a built-in interpreter.help + man
-g hop1Sets hops for IPv4 loose source routing.help + man
-G nSets the IPv4 source route “pointer” for use with -g.help + man
-m, --max-conns nThe maximum number of simultaneous connections accepted by an Ncat instance.help + man
-h, --help (HelpDisplays a short help screen with common options and parameters, and then exits.help + man
-d, --delay timeSet the delay interval for lines sent.help + man
-o, --output filenameDump session data to a filehelp + man
-x, --hex-dump filenameDump session data in hex to a file.help + man
-i, --idle-timeout timeSet a fixed timeout for idle connections.help + man
-p, --source-port portSet the port number for Ncat to bind to.help + man
-s, --source addrSpecify source address to use (doesn't affect -l)help + man
-l, --listen (ListenListen for connections rather than connecting to a remote machinehelp + man
-k, --keep-open (AcceptNormally a listening server accepts only one connection and then quits when the connection is closed.help + man
-n, --nodns (DoCompletely disable hostname resolution across all Ncat options, such as the destination, source address, source routing hops, and the proxy.help + man
-t, --telnet (AnswerHandle DO/DONT WILL/WONT Telnet negotiations.help + man
-u, --udp (UseUse UDP for the connection (the default is TCP).help + man
--sctp (UseUse SCTP for the connection (the default is TCP).help + man
-v, --verbose (BeIssue Ncat with -v and it will be verbose and display all kinds of useful connection based information.help + man
-w, --wait timeSet a fixed timeout for connection attempts.help + man
-z (Zero-I/OCauses Ncat to quit immediately after establishing a connection.help + man
--append-output (AppendIssue Ncat with --append-ouput along with -o and/or -x and it will append the resulted output rather than truncating the specified output files.help + man
--send-only (OnlyIf this option is passed, then Ncat will only send data and will ignore anything received.help + man
--recv-only (OnlyIf this option is passed, Ncat will only receive data and will not try to send anything.help + man
--no-shutdown (DoIf this option is passed, Ncat will not invoke shutdown on a socket after seeing EOF on stdin.help + man
-q timeAfter EOF on stdin, wait the specified amount of time, then quit.help + man
--allow hostThe list of hosts specified will be the only hosts allowed to connect to the Ncat process.help + man
--allowfile fileThis has the same functionality as --allow, except that the allowed hosts are provided in a new-line delimited allow file, rather than directly on the command line.help + man
--deny hostIssue Ncat with a list of hosts that will not be allowed to connect to the listening Ncat process.help + man
--denyfile fileThis is the same functionality as --deny, except that excluded hosts are provided in a new-line delimited deny file, rather than directly on the command line.help + man
--broker (ConnectionAllow multiple parties to connect to a centralised Ncat server and communicate with each other.help + man
--chat (Ad-hocThe --chat option enables chat mode, intended for the exchange of text between several users.help + man
--proxy addr[:portRequests proxying through host:port, using the protocol specified by --proxy-type.help + man
--proxy-type typeIn connect mode, this option requests the protocol proto to connect through the proxy host specified by --proxy.help + man
--proxy-auth authIn connect mode, gives the credentials that will be used to connect to the proxy server.help + man
--proxy-dns typeIn connect mode, it provides control over whether proxy destination hostnames are resolved by the remote proxy server or locally, by Ncat itself.help + man
--ssl (UseIn connect mode, this option transparently negotiates an SSL session with an SSL server to securely encrypt the connection.help + man
--ssl-cert certfile.pemThis option gives the location of a PEM-encoded certificate files used to authenticate the server (in listen mode) or the client (in connect mode).help + man
--ssl-key keyfile.pemThis option gives the location of the PEM-encoded private key file that goes with the certificate named with --ssl-cert.help + man
--ssl-verify (VerifyIn client mode, --ssl-verify is like --ssl except that it also requires verification of the server certificate.help + man
--ssl-trustfile cert.pemThis option sets a list of certificates that are trusted for purposes of certificate verification.help + man
--ssl-ciphers cipherlistThis option sets the list of ciphersuites that Ncat will use when connecting to servers or when accepting SSL connections from clients.help + man
--ssl-servername nameIn client mode, this option sets the TLS SNI (Server Name Indication) extension, which tells the server the name of the logical server Ncat is contacting.help + man
--ssl-alpn ALPNThis option allows you to specify a comma-separated list of protocols to send via the Application-Layer Protocol Negotiation (ALPN) TLS extension.help + man
--version (DisplayDisplay Ncat's version information and exithelp + man
Exit status (2) from the manual page
0there was no error
1there was a network error of some kind

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.