Linux command line trick to get the public IP of a machine

For the handful of people who have ever needed to ascertain the public IP of a computer to which they only have SSH access available, use this:

curl -s checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//'  

 

It’s effective and glorious!

x  Powerful Protection for WordPress, from Shield Security
This Site Is Protected By
Shield Security