In a remote shell, how can I find the domain name of the computer from which I logged into the remote machine?
Example: My local machine is mi.pona.com. On this machine I run
ssh [email protected] to login into the remote machine sina.pona.com. In the shell which opens (running on the remote machine) I want to find out from which computer I logged in, so I want to get the result "mi.pona.com". Is there a command for this?
whoamiandSSH_CONNECTION. On unix.stackexchange.com/questions/101955/… the top answer only mentionswho, but you can fix that by voting for the better answer.