tcp

tcp tests whether a host and port accept a TCP connection and can optionally establish and inspect a verified TLS session.

NetworkVersion 1.2.3Stable
lil-terminal

Overview

Use tcp for TCP ports and TLS connections. Common operations stay short; specialized forms add detail only when needed, so repeated work remains easy to understand, repeat and place in lil-terminal scripts.

Test the port first, then TLS

A plain probe answers whether TCP can connect. -tls adds certificate verification, -i shows protocol, cipher and certificate details, and -k deliberately removes the trust check so you can distinguish a certificate problem from basic connectivity.

Syntax

lil-terminal
tcp <host|ip|me> <port> [options]

Reference

tcp me 443

use the current host

tcp example.com 443

test a TCP port

tcp example.com 443 -tls

open a verified TLS connection

tcp example.com 443 -tls -i

show TLS protocol, cipher and certificate details

tcp example.com 443 -tls -k

allow an insecure TLS certificate

-t [seconds]

use 5 seconds (or a timeout from 1 to 300)

-T

use a 300-second timeout

-4 | -6

use IPv4 or IPv6

-tls

enable TLS with certificate verification

-i

show TLS connection and certificate details

-k

allow an insecure TLS certificate (requires -tls)

Practical workflow

Run tcp example.com 443 for a basic TCP probe, or tcp example.com 443 -tls to attempt a certificate-verified TLS handshake. Add -i to inspect the negotiated protocol, cipher and certificate. Choose -4 or -6 to diagnose address families, -t 2 for a two-second timeout, or bare -t for five seconds. -T sets 300 seconds; the default is 30.

Limits and safety

TLS is checked by default; -k disables certificate verification and is accepted only together with -tls. -i also requires -tls. A timeout, DNS failure or refused connection can be caused by hosting firewall rules, not just by the remote server. Use this diagnostic only on hosts and ports you administer or have permission to test. IP addresses, timings and certificates in the examples are illustrative rather than measured at your location.

Interactive sandbox preview

Run the prepared examples directly on the page. Their results are prebuilt and shown in the browser; no terminal command is executed on the server.

Check the port, then inspect TLS

Install and manage

Install the current compatible version. Choose Base for the complete feature set or Minimum for the reduced package; use upgrade to update a module that is already installed.

Base and Minimum are two packages of the same current module release, not separate command versions.

Base package

Install the complete package with local command reference and every published mode.

install tcp
Minimum package

Install the reduced package. Local reference is omitted; help <cmd> -i opens the current server reference.

install tcp -m
Exact public version

Install exactly this published version.

install tcp -v 1.2.3
Check or update

Ask upgrade to check compatibility and replace the installed block only when needed.

upgrade tcp
Remove module

Remove the extension block while leaving the core and unrelated modules intact.

install tcp -u

Examples

Examples are copyable command lines, not actions executed by this website. Review paths, permissions and destructive flags before running them on a real project.

Check the port, then inspect TLS
tcp example.com 443
Illustrative network snapshot — not a live request
Host      example.com
IP        192.0.2.25
Port      443
Protocol  TCP
Status    open
Time      12.0 ms
Use the current host
tcp me 443
Illustrative network snapshot — not a live request
Host      example.com
IP        192.0.2.25
Port      443
Protocol  TCP
Status    open
Time      12.0 ms
Open a verified TLS connection
tcp example.com 443 -tls
Illustrative network snapshot — not a live request
Host      example.com
IP        192.0.2.25
Port      443
Protocol  TLS
Status    open
Time      12.0 ms
Note      timeout option used
Show TLS protocol, cipher and certificate details
tcp example.com 443 -tls -i
Illustrative network snapshot — not a live request
Host      example.com
IP        192.0.2.25
Port      443
Protocol  TLS
Status    open
Time      12.0 ms
TLS       TLSv1.3
Cipher    TLS_AES_256_GCM_SHA384
Bits      256
Subject   CN=example.com
Issuer    CN=Example CA
Valid to  2030-01-01 00:00:00 UTC
Note      timeout option used
Allow an insecure TLS certificate
tcp example.com 443 -tls -k
Illustrative network snapshot — not a live request
Host      example.com
IP        192.0.2.25
Port      443
Protocol  TLS
Status    open
Time      12.0 ms
Note      certificate verification disabled (-k)
Note      timeout option used
Use IPv4 or IPv6
tcp example.com 443 -4
Illustrative network snapshot — not a live request
Host      example.com
IP        192.0.2.25
Port      443
Protocol  TCP
Status    open
Time      12.0 ms
Note      IPv4 selected
Reject an invalid port
tcp example.com 443 -6
Illustrative network snapshot — not a live request
Host      example.com
IP        2001:db8::25
Port      443
Protocol  TCP
Status    open
Time      12.0 ms
Note      IPv6 selected
Use 5 seconds (or a timeout from 1 to 300)
tcp example.com 443 -t
Illustrative network snapshot — not a live request
Host      example.com
IP        192.0.2.25
Port      443
Protocol  TCP
Status    open
Time      12.0 ms
Note      timeout option used
Use 5 seconds (or a timeout from 1 to 300)
tcp example.com 443 -t 2
Illustrative network snapshot — not a live request
Host      example.com
IP        192.0.2.25
Port      443
Protocol  TCP
Status    open
Time      12.0 ms
Note      timeout option used
Use a 300-second timeout
tcp example.com 443 -T
Illustrative network snapshot — not a live request
Host      example.com
IP        192.0.2.25
Port      443
Protocol  TCP
Status    open
Time      12.0 ms
Note      timeout option used
Allow an insecure TLS certificate (requires -tls)
tcp example.com 443 -tls -i -k
Illustrative network snapshot — not a live request
Host      example.com
IP        192.0.2.25
Port      443
Protocol  TLS
Status    open
Time      12.0 ms
TLS       TLSv1.3
Cipher    TLS_AES_256_GCM_SHA384
Bits      256
Subject   CN=example.com
Issuer    CN=Example CA
Valid to  2030-01-01 00:00:00 UTC
Note      certificate verification disabled (-k)
Note      timeout option used
Enable TLS with certificate verification
tcp example.com 443 -tls -t 5
Illustrative network snapshot — not a live request
Host      example.com
IP        192.0.2.25
Port      443
Protocol  TLS
Status    open
Time      12.0 ms
Note      timeout option used
Tcp · com
tcp example.com 70000
Illustrative network snapshot — not a live request
Invalid port
Tcp · com
tcp example.com 0
Illustrative network snapshot — not a live request
Invalid port
Show TLS connection and certificate details
tcp example.com 443 -i
Illustrative network snapshot — not a live request
-i requires TLS
Allow an insecure TLS certificate (requires -tls)
tcp example.com 443 -k
Illustrative network snapshot — not a live request
-k requires TLS
Use IPv4 or IPv6
tcp example.com 443 -4 -6
Illustrative network snapshot — not a live request
Choose either IPv4 or IPv6
Use 5 seconds (or a timeout from 1 to 300)
tcp example.com 443 -t 301
Illustrative network snapshot — not a live request
Invalid timeout
Tcp · com
tcp example.com 443 -tsl
Illustrative network snapshot — not a live request
Unknown option: -tsl (did you mean -tls?)
Tcp · -6
tcp 127.0.0.1 443 -6
Illustrative network snapshot — not a live request
Host not found
Tcp · com
tcp example.com
Illustrative network snapshot — not a live request
?

Related documentation

Current public release

v1.2.32026-10-31

Clear TCP flag errors

Unknown TCP flags are reported by name; a common -tsl typo points to -tls.