Running command "md5" on remote host not working.

My question is very strange.
I can run ls command on remote host using ssh successfully. but when i try to run /sbin/md5 command on remote host. it doesnt run and get back to me on command prompt.

md5 command is exist on remote host.
This is what i tried which ran successfully.
Query - ssh -p 2222 remote.host.server ls /my/file/name.log
Output - /my/file/name.log

And this is what is not working.
Query - ssh -p 2222 remote.host.server md5 /my/file/name.log

Souce OS - Solaris
Remote OS - FreeBSD
Is this matter ? If yes how ?

are you sure that "md5" binary is located there ? I'm using exactly the same command on SLES and RHEL and it seems to work fine.