Difference between revisions of "Man/vznnc.8"

From OpenVZ Virtuozzo Containers Wiki
< Man
Jump to: navigation, search
(Automated import of articles)
(No difference)

Latest revision as of 18:23, 23 April 2015


vznnc − run a program connected to a socket



{ -l | -c } -p port [-f fd] [--] program [arg ...]


This "nano-netcat" utility can be used to either listen on or connect to a TCP port at localhost, and run a specified program with its stdin and stdout (or a specified file descriptor) connected to the socket.



Listen on a specified TCP port at localhost.


Connect to a specified TCP port at localhost.

-p port

Port number.

-f fd

File descriptor ID. If this option is not set, stdin and stdout are closed and are connected to the socket, otherwise they are left intact, and the specified fd is used.


This is a separator between vznnc own arguments and program arguments, so that latter won’t be processed by vznnc. It is required in case there are any arguments to program that start with the dash (-) character, and is optional otherwise.

program [ arg ... ]

Program to run, with optional arguments.


Returns program exit status upon success, or one of the following codes in case of an error:


Invalid usage


Error executing program.


Network-related error.


To run receiving side of ploop copy command on a remote server, using openssh port forwarding:

 ssh -L localhost:$PORT:localhost:$PORT $REMOTE_SERVER \
     vznnc -l -p $PORT -- ploop copy -d $FILE -i0 -o1

To do the same, but with stdin and stdout intact, using file descriptor 5 for communication:

 ssh -L localhost:$PORT:localhost:$PORT $REMOTE_SERVER \
     vznnc -l -p $PORT -f 5 -- ploop copy -d $FILE -i5 -o5

SEE ALSO[edit]

nc(3), netcat(3), socat(2).


Copyright (C) 2014, Parallels, Inc. Licensed under GNU GPL v2.