There is access to a computer with ssh as root. How to Find all computers in the network?

Good afternoon. Asked this task - there is a computer, and it has root access via ssh. How to find all computers in the network in which it is located? Let's say he is behind a NAT (or something else, but we connected via ssh). and this computer has no nmap. The task for the interview. I responded with nmap, but they told me that nmap is not on this computer, otherwise.
July 4th 19 at 22:58
4 answers
July 4th 19 at 23:00
Solution
for i in {1..254}; do ping -c 1-W 1 192.168.0.$i | grep 'from'; done
For some reason I does not work, just busy with the console and all (blinking input cursor). Already recorded in a separate file .sh and made it executable, ran - the picture is the same. - rebekah commented on July 4th 19 at 23:03
: ip you just 192.168.0/16 ? Your network replace.
Curious who you sobesednitsy with this level? - robbie.Wuns commented on July 4th 19 at 23:06
: I'm still learning, cabezadas for fun, just to experience were in interviews. Networks are tough for me, more is given and python in General, various application software under Linux. How to determine your network? ifconfig? - rebekah commented on July 4th 19 at 23:09
: Yes, ifconfig.
Just you have such a distinct gap between the level of knowledge and level of tasks :) - robbie.Wuns commented on July 4th 19 at 23:12
pings can be disabled in the system or blocked by iptables - Hulda_Yost commented on July 4th 19 at 23:15
July 4th 19 at 23:02
Pings hosts can not answer, Petr Ivanov said right after the ping, you need to look ARP table
I understand the task is quite basic, and perhaps they are in the problem will meet, but thank you anyway! - rebekah commented on July 4th 19 at 23:05
July 4th 19 at 23:04
1. pinguy one :)
2. Make small skriptik which automatiseret this task
July 4th 19 at 23:06

Find more questions by tags LinuxSSH