| Server IP : 82.148.16.210 / Your IP : 216.73.216.19 Web Server : nginx/1.29.5 System : Linux mail.sarafai.ru 6.1.0-43-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.162-1 (2026-02-08) x86_64 User : root ( 0) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/746/root/usr/share/doc/netcat-traditional/ |
Upload File : |
Examples
--------
Many examples can be found in /usr/share/doc/netcat-traditional/README.gz. The rest of
this file collects some more that have been contributed by users.
Encrypted File Transfer
(courtesy of Tom Buskey <tom@buskey.name>)
Suppose you have an ssh tunnel, and you want to copy a file to the
remote machine. You could just scp it directly, but that opens up
another connection. The goal is to re-use the existing connection.
You can use netcat to do this:
When you SSH in, add -L 31000:127.0.0.1:31000
On the remote:
nc -lvnp 31000 127.0.0.1 > file
On the local:
nc -v -w 2 127.0.0.1 31000 < file
No extra overhead. TCP takes care of error correction. SSH has
already encrypted the pipe.