For finding an open ssh port on your network
for i in {1,10,20,30,40}; do sudo nmap 192.168.$i.* -p 22 --open; done
(Change the 1, 10 etc... to reflect what subnets you have)
For ports in use on localhost:
lsof -Pn +M -i4
also this, which I use to track down ports that are open & blocking something else :
netstat -anlp | grep -w "Proto\|LISTEN"
Cheers, that will definitely come in useful.
@aggi started
London Fixed Gear and Single-Speed is a community of predominantly fixed gear and single-speed cyclists in and around London, UK.
This site is supported almost exclusively by donations. Please consider donating a small amount regularly.
For finding an open ssh port on your network
(Change the 1, 10 etc... to reflect what subnets you have)
For ports in use on localhost:
also this, which I use to track down ports that are open & blocking something else :