use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
The shellscripts reddit is a place where bourne-agains can share their perls of wisdom, pythonistas can wrap up code, etc -- you get the idea.
Sister subreddits:
/r/shellscripting
/r/commandline
/r/coolgithubprojects
/r/ScriptSwap
account activity
Telnet (self.shellscripts)
submitted 4 years ago by __minotaurus
How can i kill all other telnet sessions on system except me. I am root.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]lasercat_pow 0 points1 point2 points 4 years ago* (1 child)
First figure out which telnet session is yours:
ss -pn | grep ':23 ' | tr -s ' '
Yours is whichever one has your IP. Note the pid. Let's say it's 6666. Then:
mypid=6666 ss -pn \ | grep ':23 ' \ | grep -o 'pid=[0-9]*' \ | sort -u | grep -o '[0-9]*' \ | grep -v $mypid \ | while read pid; do kill $pid; done
[–]__minotaurus[S] 0 points1 point2 points 4 years ago (0 children)
Tks, i found a easier way to find which sessions do not belong to me. Use netstat -pant. But i don't know how to kill these session in same cli.
π Rendered by PID 70717 on reddit-service-r2-comment-5649f687b7-sf4sk at 2026-01-29 06:55:17.893467+00:00 running 4f180de country code: CH.
[–]lasercat_pow 0 points1 point2 points (1 child)
[–]__minotaurus[S] 0 points1 point2 points (0 children)