Let's say my eth0
interface has multiple IP addresses and I can connect with SSH to any of these. Is there a way to find out which of those I am connected to?
(The background is that certain operations, like removing an IP from the host, is better not done from the given IP address. To avoid this, I want to check this first, before I am closing myself out.)
echo "$SSH_CONNECTION"
than to log out and start a new ssh connection.