Not every host lets you SSH into it to run commands. The mDNS hostname is not always the same as your system hostname since it can change due to conflicts. Some Linux distros don't even have a built-in util to show your own mDNS name.