machine A has a connection to macine B.
It is possible to run some command on machine B as you are on machine A such as:
# ssh 10.0.27.254 ls
# ssh 10.0.27.254 mkdir aDir
but when I do
# ssh 10.0.27.254 echo $HOSTNAME it doesn't print the name of the remote machine (B)
How can I get that information?