# uses pre-shared keys, assuming the server is configured correctly. use sshpass if you must use plaintext passwords, but preferably don't.
ssh user@$(nmap -sP 192.168.1.0/24 >/dev/null && arp -an | grep "[mac-address-here]" | awk '{print $2}' | sed 's/[()]//g') -t "ntop -s CPU% || htop || top" || echo "ntop, htop and top failed, or the SSH connection failed. check the keys."