1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-22 23:02:07 +02:00
tldr/pages/linux/ncat.md
Fazle Arefin 1e5b6c4ed4
ncat: add examples (#12226)
* ncat: add examples

---------

Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2024-02-10 09:38:16 +05:30

29 lines
881 B
Markdown

# 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>.
- Listen for input on the specified port and write it to the specified file:
`ncat -l {{port}} > {{path/to/file}}`
- Accept multiple connections and keep ncat open after they have been closed:
`ncat -lk {{port}}`
- Write output of specified file to the specified host on the specified port:
`ncat {{address}} {{port}} < {{path/to/file}}`
- Accept multiple incoming connections on an encrypted channel evading detection of traffic content:
`ncat --ssl -k -l {{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 {{seconds}} -vz {{host}} {{port}}`