1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-06-06 19:26:01 +02:00
tldr/pages/linux/ncat.md

30 lines
988 B
Markdown
Raw Normal View History

2017-11-01 20:52:54 +01:00
# ncat
> Read, write, redirect, and encrypt data across a network.
> An alternative implementation of a similar utility called `netcat`/`nc`.
> More information: <https://nmap.org/ncat/guide/index.html>.
2017-11-01 20:52:54 +01:00
- Listen for input on the specified port and write it to the specified file:
`ncat {{[-l|--listen]}} {{port}} > {{path/to/file}}`
2018-03-26 07:47:48 +00:00
- Accept multiple connections and keep ncat open after they have been closed:
`ncat {{[-lk|--listen --keep-open]}} {{port}}`
2017-11-01 20:52:54 +01:00
- Write output of specified file to the specified host on the specified port:
2018-03-26 07:47:48 +00:00
`ncat {{address}} {{port}} < {{path/to/file}}`
- Accept multiple incoming connections on an encrypted channel evading detection of traffic content:
`ncat --ssl {{[-k|--keep-open]}} {{[-l|--listen]}} {{port}}`
- Connect to an open `ncat` connection over SSL:
`ncat --ssl {{host}} {{port}}`
- Check connectivity to a remote host on a particular port with timeout:
`ncat {{[-w|--wait]}} {{seconds}} {{[-vz|--verbose -z]}} {{host}} {{port}}`