Linux NC Command Transfer file

Source: Internet
Author: User

NAME

Nc-arbitrary TCP and UDP connections and listens
Synopsis
NC [ -46DDHKLNRSTUUVZ] [-I interval] [-P source_port] [-S source_ip_address] [-t ToS] [w timeout]
[-X Proxy_protocol] [-X proxy_address[:p ORT]] [hostname] [Port[s]]

as the company's equipment sudo does not have ssh,SCP and other remote access commands, or host.deny inside set the SSH deny, regardless of the reason. Today I've crossed the usual SCP to illustrate the next more useful lightweight tool, andanother powerful ---file transfer for NC.

Examples are as follows:

Purpose host Monitoring

Nc-l Listening Port < unused port > > file name to receive

Nc-l 4444 > cache.tar.gz

The source host initiates the request

NC Destination Host IP destination port < file to be sent

NC 192.168.0.85 4444 </root/cache.tar.gz

Netstat as follows

[Email protected] jiangbao]# NETSTAT-TPLN

TCP 0 0 0.0.0.0:4444 0.0.0.0:* LISTEN 18166/nc

The English description is as follows

DATA TRANSFER

Start by using the NC to listen in a specific port with output captured into a file:

$ nc-l 1234 > Filename.out
Using a second machine, connect to the listening NC process, feeding it the file which are to be transferred:

$ NC host.example.com 1234 < filename.in

additional options for NC are described:

Syntax:NC [-hlnruz][-g< Gateway...>][-g< number of pointing device>][-i< delay seconds>][-o< output File>][-p< communication ports>][-s< Source Address>][-v ...] [-w< timeout number of seconds>][Host Name[Communication port...]

Additional notes:Execute this instruction to set the relevant parameters of the router.

Parameters:
-g< Gateway> Set Router Hop communication gateway, the most lost Oh can be set8 of them.
-g< number of pointing device> sets the source route locator with a value ofMultiples of 4.
-H online Help.
-i< delay seconds> Set the time interval for transmitting information and scanning communication ports.
-L Use the monitor mode to control incoming data.
-N Direct useIP address, not through the domain nameServer。
-p< Communication Port> Sets the communication port used by the local host.
-R chaos Specifies the communication port between the local and the remote host.
-s< Source Location > Set the IP address of the local host to send the packet .
-U uses the UDP transport protocol .
-V Displays the instruction execution process.
-w< timeout seconds > set the time to wait for the connection.
-Z uses 0 input /output mode, only when scanning communication ports

Linux NC Command Transfer file

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.