vznnc(8)

πŸ“¦ version 4.9.4, in ubuntu jammy

🌸 NAME 🌸

vznnc β€” run a program connected to a socket, bestie. that's it, that's the whole vibe πŸ’…


✨ SYNOPSIS ✨

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

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so listen up, this little cutie is the "nano-netcat" utility, and what she does is either listen on or connect to a TCP port at localhost β€” pick your fighter β€” and then run a specified program with its stdin and stdout (or a specified file descriptor) connected to the socket. that's the whole personality. tiny, iconic, does exactly one job and does it flawlessly. no cap 🫢


πŸ’– OPTIONS πŸ’–

  • -l β€” Listen on a specified TCP port at localhost. she's in her waiting era πŸ‘‘
  • -c β€” Connect to a specified TCP port at localhost. she's in her going to you era πŸ¦‹
  • -p port β€” Port number. just the number, bestie, don't overthink it.
  • -f fd β€” File descriptor ID. so here's the tea: if this option is not set, stdin and stdout are closed and get connected to the socket. if you do set it, they're left intact, and the fd you specified is the one that gets used instead. choose wisely πŸ’€
  • -- β€” this is the separator between vznnc's own arguments and the program's arguments, so the latter won't get processed by vznnc. it's required if your program has any arguments starting with a dash (-), and it's optional otherwise. lowkey a boundary-setting queen βœ‹
  • program [ arg ... ] β€” Program to run, with optional arguments. go off, king.

πŸ”₯ EXIT STATUS πŸ”₯

on success she returns the program's exit status β€” yes, she hands you the receipts from the program itself, not her own. but if she messes up, you get one of these:

  1. 1 β€” Invalid usage. (you did something funky with the arguments, respectfully)
  2. 127 β€” Error executing program.
  3. 220 β€” Network-related error. πŸ’€

🌈 EXAMPLES 🌈

Example numero uno β€” running the receiving side of the ploop copy command on a remote server, using openssh port forwarding. the way that ssh -L carries this whole operation… obsessed ✨

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

Example deux β€” same thing, same energy, but this time with stdin and stdout left intact, using file descriptor 5 for the communication. main character fd energy πŸŽ€

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

🧚 SEE ALSO 🧚

  • nc(3)
  • netcat(3)
  • socat(2)

the whole friend group, fr fr 🫢


πŸ‘‘ LICENSE πŸ‘‘

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


legal girlies stay winning, that's the whole license, no drama, just GPLv2 πŸ’œ

okay bestie that's the whole page πŸ’– this is vznnc(8) from the Containers manual, brought to you by OpenVZ, dated 29 May 2014 β€” yeah she's a 2014 baby and she still eats. periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from