From 15bb07c27a6a0880f697890970196a6dfcec5875 Mon Sep 17 00:00:00 2001 From: terminalforlife Date: Thu, 5 Mar 2020 21:17:17 +0000 Subject: [PATCH] Elaborate/correct wording & formatting of `ss` --- sheets/ss | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/sheets/ss b/sheets/ss index 90f10d9..0771b2f 100644 --- a/sheets/ss +++ b/sheets/ss @@ -1,5 +1,6 @@ -# Utility to investigate sockets -# +# ss +# Another utility to investigate sockets + # Options: # -4/-6 list ipv4/ipv6 sockets # -n numeric addresses instead of hostnames @@ -7,19 +8,23 @@ # -u/-t/-x list udp/tcp/unix sockets # -p Show process(es) that using socket -# show all listening tcp sockets including the corresponding process +# Show all listening TCP ports, including the corresponding process. ss -tlp -# show all sockets connecting to 192.168.2.1 on port 80 +# Show a summary of all ports connecting to 192.168.2.1 via port 80. ss -t dst 192.168.2.1:80 -# show all ssh related connection -# documentation on the filter syntax: sudo apt-get install iproute2-doc +# Show all SSH-related connection. +# +# Documentation on the filter syntax can be installed via the following command +# if on a Debian- or Ubuntu-based distribution of Linux: +# +# sudo apt-get install iproute2-doc +# ss -t state established '( dport = :ssh or sport = :ssh )' -# Display timer information -ss -tn -o +# Display timer information. +ss -tno -# Filtering connections by tcp state +# Filter connections by TCP state. ss -t4 state established -