🖥️ss
➡️This is a command-line reference manual for commands and command combinations that you don’t use often enough to remember it. This cheatsheet explains the ss command with important options and switches using examples.
3 minute read
▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁
# ███████╗███████╗
# ██╔════╝██╔════╝
# ███████╗███████╗
# ╚════██║╚════██║
# ███████║███████║
# ╚══════╝╚══════╝
# The 'ss' stands for socket statistics. The command investigates the socket and shows information similar to netstat command. It can display more TCP and state informations than other tools.
# Utility to investigate sockets
Args
-4/-6 list ipv4/ipv6 sockets
-n numeric addresses instead of hostnames
-l list listing sockets
-u/-t/-x list udp/tcp/unix sockets
-p Show process(es) that using socket
# show all listing tcp sockets including the corresponding process
ss -tlp
# show all sockets connecting to 192.168.2.1 on port 80
ss -t dst 192.168.2.1:80
# show all ssh related connection
ss -t state established '( dport = :ssh or sport = :ssh )'
# Display timer information
ss -tn -o
# Filtering connections by tcp state
ss -t4 state established
#Find all clients connected to HTTP or HTTPS ports
#It finds, specifically, the connections to the HTTP and HTTPS ports as source ports. You can check for destination ports as well.
ss -o state established '( dport = :http or sport = :https )'
#This is sample output - yours may be different.
$ ss -o state established '( sport = :http or sport = :https )'
# Recv-Q Send-Q Local Address:Port Peer Address:Port
# 0 0 123.123.123.123:https 31.14.72.45:9776
# 0 0 123.123.123.123:http 67.204.23.12:55646
# Find all clients connected to HTTP or HTTPS ports - It finds, specifically, the connections to the HTTP and HTTPS ports as source ports. You can check for destination ports as well.
ss -o state established '( dport = :http or sport = :https )'
# Sample output
# $ ss -o state established '( sport = :http or sport = :https )'
# Recv-Q Send-Q Local Address:Port Peer Address:Port
# 0 0 123.123.123.123:https 31.14.72.45:9776
# 0 0 123.123.123.123:http 67.204.23.12:55646
# Show all current listening programs by port and pid with SS instead of netstat
ss -plunt
#==============================##==============================#
# CMD SS
#==============================##==============================#
Cheatsheets are an excellent complement to other information sources like Linux man-pages, Linux help, or How-To’s and tutorials, as they provide compact and easily accessible information. While man-pages and detailed tutorials often contain comprehensive explanations and extensive guides, cheatsheets summarize the most important options forthe command ss in a clear format. This allows users to quickly access the needed information for ss without having to sift through lengthy texts. Especially in stressful situations or for recurring tasks, cheatsheets for ss are a valuable resource to work efficiently and purposefully.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.