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!