Answer the question
In order to leave comments, you need to log in
There is access to the computer via ssh with root rights. How to find all computers on the network?
Good afternoon. We set such a task - there is a computer, and there is root access to it - access via ssh. How to find all computers on the network it's on? Let's say it's behind NAT (or something else, but we connected to it via ssh). and there is no nmap on this computer. Interview task. I answered - nmap, but they told me that nmap is not on this computer, it needs to be done differently.
Answer the question
In order to leave comments, you need to log in
for i in {1..254}; do ping -c 1 -W 1 192.168.0.$i | grep 'from'; done
Hosts may not respond to pings, Peter Ivanov Peter Ivanov correctly said that after ping you need to look at the arp table
1. ping one at a time :)
2. Make a small script that automates this task
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question