Changes

Jump to: navigation, search

Man/vznnc.8

4,313 bytes added, 18:23, 23 April 2015
Automated import of articles
== NAME ==

<p style="margin-left:11%; margin-top: 1em">vznnc &minus;
run a program connected to a socket</p>

== SYNOPSIS ==

<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="7%">

<p style="margin-top: 1em"><b>vznnc</b></p></td>
<td width="2%"></td>
<td width="77%">

<p style="margin-top: 1em">{ <b>-l</b> | <b>-c</b> }
<b>-p</b> <i>port</i> [<b>-f&nbsp;</b><i>fd</i>] [<b>--</b>]
<i>program</i> [<i>arg ...</i>]</p></td>
<td width="3%">
</td></tr>
</table>

== DESCRIPTION ==

<p style="margin-left:11%; margin-top: 1em">This
&quot;nano-netcat&quot; utility can be used to either listen
on or connect to a TCP port at localhost, and run a
specified <i>program</i> with its stdin and stdout (or a
specified file descriptor) connected to the socket.</p>

== OPTIONS ==

<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">

<p style="margin-top: 1em"><b>-l</b></p></td>
<td width="8%"></td>
<td width="69%">

<p style="margin-top: 1em">Listen on a specified TCP port
at localhost.</p></td>
<td width="9%">
</td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">

<p><b>-c</b></p></td>
<td width="8%"></td>
<td width="69%">

<p>Connect to a specified TCP port at localhost.</p></td>
<td width="9%">
</td></tr>
</table>

<p style="margin-left:11%;"><b>-p</b> <i>port</i></p>

<p style="margin-left:22%;">Port number.</p>

<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="7%">

<p><b>-f</b> <i>fd</i></p></td>
<td width="4%"></td>
<td width="78%">

<p>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 <i>fd</i> is
used.</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="7%">

<p><b>--</b></p></td>
<td width="4%"></td>
<td width="78%">

<p>This is a separator between <b>vznnc</b> own arguments
and <i>program</i> arguments, so that latter won&rsquo;t be
processed by <b>vznnc</b>. It is required in case there are
any arguments to <i>program</i> that start with the dash
(<b>-</b>) character, and is optional otherwise.</p></td></tr>
</table>

<p style="margin-left:11%;"><i>program</i> [ <i>arg ...</i>
]</p>

<p style="margin-left:22%;">Program to run, with optional
arguments.</p>

== EXIT STATUS ==

<p style="margin-left:11%; margin-top: 1em">Returns
<i>program</i> exit status upon success, or one of the
following codes in case of an error:</p>

<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">

<p>1</p></td>
<td width="7%"></td>
<td width="36%">

<p>Invalid usage</p></td>
<td width="42%">
</td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">

<p>127</p></td>
<td width="7%"></td>
<td width="36%">

<p>Error executing <i>program</i>.</p></td>
<td width="42%">
</td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">

<p>220</p></td>
<td width="7%"></td>
<td width="36%">

<p>Network-related error.</p></td>
<td width="42%">
</td></tr>
</table>

== EXAMPLES ==

<p style="margin-left:11%; margin-top: 1em">To run
receiving side of <b>ploop copy</b> command on a remote
server, using openssh port forwarding:</p>

<pre style="margin-left:11%; margin-top: 1em"> PORT=2345
ssh -L localhost:$PORT:localhost:$PORT $REMOTE_SERVER \
vznnc -l -p $PORT -- ploop copy -d $FILE -i0 -o1</pre>

<p style="margin-left:11%; margin-top: 1em">To do the same,
but with stdin and stdout intact, using file descriptor 5
for communication:</p>

<pre style="margin-left:11%; margin-top: 1em"> ssh -L localhost:$PORT:localhost:$PORT $REMOTE_SERVER \
vznnc -l -p $PORT -f 5 -- ploop copy -d $FILE -i5 -o5</pre>

== SEE ALSO ==

<p style="margin-left:11%; margin-top: 1em"><b>nc</b>(3),
<b>netcat</b>(3), <b>socat</b>(2).</p>

== LICENSE ==

<p style="margin-left:11%; margin-top: 1em">Copyright (C)
2014, Parallels, Inc. Licensed under GNU GPL v2.</p>
2,253
edits

Navigation menu