Get Public IP of linux box via ssh

To get public IP  (not local IP) of remote linux box, use the following command.

$ wget -qO- http://ipecho.net/plain | xargs echo

returns the external or public IP of your machine.

 

 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: