Many times we need get the ip for remote, a very simple way is by using the ping command
If you execute the command in the more simple option, like show below, you only get a pretty output telling if you remote host is alive.
cloud-4@:/wp/production/srvr/diag> /usr/sbin/ping cloud-2 cloud-4 is alive
Using the -s option you get more info, incluiding the ip;
cloud-4@:/wp/production/srvr/diag> /usr/sbin/ping -s cloud-2 PING cloud-2: 56 data bytes 64 bytes from cloud-2 (184.108.40.206): icmp_seq=0. time=0.098 ms 64 bytes from cloud-2 (220.127.116.11): icmp_seq=1. time=0.087 ms 64 bytes from cloud-2 (18.104.22.168): icmp_seq=2. time=0.067 ms ^C ----cloud-2 PING Statistics---- 3 packets transmitted, 3 packets received, 0% packet loss round-trip (ms) min/avg/max/stddev = 0.067/0.084/0.098/0.016
HTH – Antonio NAVARRO